rpm/rpm-4.11.1-application-provides.patch

29 lines
1.1 KiB
Diff

commit 4775f07b5108f61a3910ca3110315c1543c109b5
Author: Michael Schroeder <mls@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@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