[desktop-file-utils] be more forgiving about localestring lists

Matthias Clasen mclasen at fedoraproject.org
Fri Dec 23 18:01:33 UTC 2011


commit 25bcccb9f71fc769b54f8f0ad62bc5eb6e12b1b0
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Fri Dec 23 12:59:47 2011 -0500

    be more forgiving about localestring lists
    
    This turned up when first building packages with the new
    Keywords key.

 desktop-file-utils.spec |   12 ++++++++----
 localelist-fixup.patch  |   13 +++++++++++++
 2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/desktop-file-utils.spec b/desktop-file-utils.spec
index 1433df6..4c00a37 100644
--- a/desktop-file-utils.spec
+++ b/desktop-file-utils.spec
@@ -4,13 +4,16 @@
 Summary: Utilities for manipulating .desktop files
 Name: desktop-file-utils
 Version: 0.19
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://www.freedesktop.org/software/desktop-file-utils
 Source0: http://www.freedesktop.org/software/desktop-file-utils/releases/%{name}-%{version}.tar.xz
 Source1: desktop-entry-mode-init.el
 License: GPLv2+
 Group: Development/Tools
 
+# https://bugs.freedesktop.org/show_bug.cgi?id=44098
+Patch0: localelist-fixup.patch
+
 BuildRequires: glib2-devel
 
 %description
@@ -45,6 +48,7 @@ Install the %{name} package to use %{pkgname} with GNU Emacs.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure
@@ -59,7 +63,6 @@ install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_emacs_sitestartdir}/desktop-entry-
 touch $RPM_BUILD_ROOT%{_emacs_sitestartdir}/desktop-entry-mode-init.elc
 
 %files
-%defattr(-,root,root)
 %doc AUTHORS COPYING README NEWS
 %{_bindir}/*
 %{_mandir}/man1/desktop-file-install.1.gz
@@ -68,17 +71,18 @@ touch $RPM_BUILD_ROOT%{_emacs_sitestartdir}/desktop-entry-mode-init.elc
 %{_mandir}/man1/desktop-file-edit.1.gz
 
 %files -n emacs-%{pkg}
-%defattr(-,root,root,-)
 %{_emacs_sitestartdir}/desktop-entry-mode-init.el
 %ghost %{_emacs_sitestartdir}/desktop-entry-mode-init.elc
 %dir %{_emacs_sitelispdir}/%{pkg}
 %{_emacs_sitelispdir}/%{pkg}/*.elc
 
 %files -n emacs-%{pkg}-el
-%defattr(-,root,root,-)
 %{_emacs_sitelispdir}/%{pkg}/*.el
 
 %changelog
+* Fri Dec 23 2011 Matthias Clasen <mclasen at redhat.com> - 0.19-2
+- Fix up locale lists just like other lists
+
 * Tue Dec 20 2011 Matthias Clasen <mclasen at redhat.com> - 0.19-1
 - Update to 0.19: support for Unity as desktop env, and support
   for Keywords
diff --git a/localelist-fixup.patch b/localelist-fixup.patch
new file mode 100644
index 0000000..1773f33
--- /dev/null
+++ b/localelist-fixup.patch
@@ -0,0 +1,13 @@
+diff -up desktop-file-utils-0.19/src/validate.c.localelist desktop-file-utils-0.19/src/validate.c
+--- desktop-file-utils-0.19/src/validate.c.localelist	2011-12-23 12:42:27.910908853 -0500
++++ desktop-file-utils-0.19/src/validate.c	2011-12-23 12:42:47.493908152 -0500
+@@ -2740,7 +2740,8 @@ desktop_file_fixup (GKeyFile   *keyfile,
+   /* Fix lists to have a ';' at the end if they don't */
+   for (i = 0; i < G_N_ELEMENTS (registered_desktop_keys); i++) {
+     if (registered_desktop_keys[i].type != DESKTOP_STRING_LIST_TYPE &&
+-        registered_desktop_keys[i].type != DESKTOP_REGEXP_LIST_TYPE)
++        registered_desktop_keys[i].type != DESKTOP_REGEXP_LIST_TYPE &&
++        registered_desktop_keys[i].type != DESKTOP_LOCALESTRING_LIST_TYPE)
+       continue;
+ 
+     value = g_key_file_get_value (keyfile, GROUP_DESKTOP_ENTRY,


More information about the scm-commits mailing list