teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.11.1-application-provides.patch

Panu Matilainen 944d93
commit 4775f07b5108f61a3910ca3110315c1543c109b5
Panu Matilainen 944d93
Author: Michael Schroeder <mls@suse.de>
Panu Matilainen 944d93
Date:   Wed Oct 2 15:02:18 2013 +0200
Panu Matilainen 944d93
Panu Matilainen 944d93
    Add application() and application(filename) provides for desktop files.
Panu Matilainen 944d93
    
Panu Matilainen 944d93
    Gnome software center needs to know what package to deinstall if it
Panu Matilainen 944d93
    needs to deinstall a desktop application. Looking up provides it much
Panu Matilainen 944d93
    cheaper than looking up which package owns a file.
Panu Matilainen 944d93
    
Panu Matilainen 944d93
    We also add an empty application() provides to make it easy to
Panu Matilainen 944d93
    enumerate all packages containing desktop applications.
Panu Matilainen 944d93
    
Panu Matilainen 944d93
    Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen 944d93
Panu Matilainen 944d93
diff --git a/scripts/desktop-file.prov b/scripts/desktop-file.prov
Panu Matilainen 944d93
index 5b159ae..54b7280 100755
Panu Matilainen 944d93
--- a/scripts/desktop-file.prov
Panu Matilainen 944d93
+++ b/scripts/desktop-file.prov
Panu Matilainen 944d93
@@ -11,6 +11,8 @@ while read instfile ; do
Panu Matilainen 944d93
 	*.desktop)
Panu Matilainen 944d93
 		if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
Panu Matilainen 944d93
 		if ! grep -q '^Exec=' "$instfile"; then continue; fi
Panu Matilainen 944d93
+		echo "application()"
Panu Matilainen 944d93
+		echo "application(${instfile##*/applications/})"
Panu Matilainen 944d93
 		mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
Panu Matilainen 944d93
 		IFS=';'
Panu Matilainen 944d93
 		for type in $mime ; do