[rpm] - generate application() provides from .desktop files (for gnome-software)
Panu Matilainen
pmatilai at fedoraproject.org
Mon Oct 14 08:37:29 UTC 2013
commit 944d93e50438d2ec898b6ca66cdac1f2bb5c5770
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Mon Oct 14 11:37:00 2013 +0300
- generate application() provides from .desktop files (for gnome-software)
rpm-4.11.1-application-provides.patch | 28 ++++++++++++++++++++++++++++
rpm.spec | 7 ++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/rpm-4.11.1-application-provides.patch b/rpm-4.11.1-application-provides.patch
new file mode 100644
index 0000000..8cb4263
--- /dev/null
+++ b/rpm-4.11.1-application-provides.patch
@@ -0,0 +1,28 @@
+commit 4775f07b5108f61a3910ca3110315c1543c109b5
+Author: Michael Schroeder <mls at suse.de>
+Date: Wed Oct 2 15:02:18 2013 +0200
+
+ Add application() and application(filename) provides for desktop files.
+
+ Gnome software center needs to know what package to deinstall if it
+ needs to deinstall a desktop application. Looking up provides it much
+ cheaper than looking up which package owns a file.
+
+ We also add an empty application() provides to make it easy to
+ enumerate all packages containing desktop applications.
+
+ Signed-off-by: Panu Matilainen <pmatilai at redhat.com>
+
+diff --git a/scripts/desktop-file.prov b/scripts/desktop-file.prov
+index 5b159ae..54b7280 100755
+--- a/scripts/desktop-file.prov
++++ b/scripts/desktop-file.prov
+@@ -11,6 +11,8 @@ while read instfile ; do
+ *.desktop)
+ if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
+ if ! grep -q '^Exec=' "$instfile"; then continue; fi
++ echo "application()"
++ echo "application(${instfile##*/applications/})"
+ mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
+ IFS=';'
+ for type in $mime ; do
diff --git a/rpm.spec b/rpm.spec
index 8f3580e..90d04fa 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}8%{?dist}
+Release: %{?snapver:0.%{snapver}.}9%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2
@@ -54,6 +54,7 @@ Patch103: rpm-4.11.1-file-triplet-check.patch
Patch104: rpm-4.11.1-caps-double-free.patch
Patch105: rpm-4.11.1-empty-lua-script.patch
Patch106: rpm-4.11.1-ppc64le.patch
+Patch107: rpm-4.11.1-application-provides.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -259,6 +260,7 @@ packages on a system.
%patch104 -p1 -b .caps-double-free
%patch105 -p1 -b .empty-lua-script
%patch106 -p1 -b .ppc64le
+%patch107 -p1 -b .application-provides
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -515,6 +517,9 @@ exit 0
%doc COPYING doc/librpm/html/*
%changelog
+* Mon Oct 14 2013 Panu Matilainen <pmatilai at redhat.com> - 4.11.1-9
+- generate application() provides for gnome-software
+
* Tue Oct 01 2013 Panu Matilainen <pmatilai at redhat.com> - 4.11.1-8
- add support for ppc64le architecture
More information about the scm-commits
mailing list