- make --vendor optional

This commit is contained in:
Ray Strode 2007-02-02 19:54:44 +00:00
parent 7fbed36ccb
commit b39b2cc6e9
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,31 @@
--- desktop-file-utils-0.12/src/install.c 18 Apr 2006 22:08:10 -0000 1.18
+++ desktop-file-utils-0.12/src/install.c 2 Feb 2007 19:43:27 -0000
@@ -96,12 +96,10 @@ process_one_file (const char *filename,
GError *rebuild_error;
GSList *tmp;
- g_assert (vendor_name);
-
dirname = g_path_get_dirname (filename);
basename = g_path_get_basename (filename);
- if (!g_str_has_prefix (basename, vendor_name))
+ if (vendor_name && !g_str_has_prefix (basename, vendor_name))
{
char *new_base;
new_base = g_strconcat (vendor_name, "-", basename, NULL);
@@ -564,12 +562,6 @@ main (int argc, char **argv)
if (vendor_name == NULL)
vendor_name = g_strdup (g_getenv ("DESKTOP_FILE_VENDOR"));
- if (vendor_name == NULL)
- {
- g_printerr (_("Must specify the vendor namespace for these files with --vendor\n"));
- return 1;
- }
-
if (copy_generic_name_to_name && copy_name_to_generic_name)
{
g_printerr (_("Specifying both --copy-name-to-generic-name and --copy-generic-name-to-name at once doesn't make much sense.\n"));

View File

@ -1,7 +1,7 @@
Summary: Utilities for manipulating .desktop files Summary: Utilities for manipulating .desktop files
Name: desktop-file-utils Name: desktop-file-utils
Version: 0.12 Version: 0.12
Release: 1%{?dist} Release: 2%{?dist}
URL: http://www.freedesktop.org/software/desktop-file-utils URL: http://www.freedesktop.org/software/desktop-file-utils
Source0: %{name}-%{version}.tar.gz Source0: %{name}-%{version}.tar.gz
License: GPL License: GPL
@ -13,6 +13,8 @@ BuildRequires: emacs
Obsoletes: desktop-file-validator Obsoletes: desktop-file-validator
Patch0: desktop-file-utils-0.12-make-vendor-optional.patch
%description %description
.desktop files are used to describe an application for inclusion in .desktop files are used to describe an application for inclusion in
GNOME or KDE menus. This package contains desktop-file-validate which GNOME or KDE menus. This package contains desktop-file-validate which
@ -23,6 +25,7 @@ fixing it up in the process.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .make-vendor-optional
%build %build
@ -52,6 +55,9 @@ update-desktop-database %{_datadir}/applications || :
%{_datadir}/emacs/site-lisp/ %{_datadir}/emacs/site-lisp/
%changelog %changelog
* Tue Nov 28 2006 Ray Strode <rstrode@redhat.com> - 0.12-2
- make --vendor optional
* Tue Nov 28 2006 Ray Strode <rstrode@redhat.com> - 0.12-1 * Tue Nov 28 2006 Ray Strode <rstrode@redhat.com> - 0.12-1
- Update to 0.12 - Update to 0.12