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>
This commit is contained in:
Michael Schroeder 2013-10-02 15:02:18 +02:00 committed by Panu Matilainen
parent e17e8cc14c
commit 4775f07b51
1 changed files with 2 additions and 0 deletions

View File

@ -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