diff --git a/mimetypes.prov b/mimetypes.prov index bbdaf86..70d5312 100644 --- a/mimetypes.prov +++ b/mimetypes.prov @@ -6,11 +6,13 @@ OLD_IFS="$IFS" while read instfile ; do case "$instfile" in *.desktop) - mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2) - IFS=';' - for type in $mime ; do - echo 'mimetype('$type')' - done + if grep '^Type *= *Application' "$instfile" >/dev/null 2>&1 ; then + mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2) + IFS=';' + for type in $mime ; do + echo 'mimehandler('$type')' + done + fi ;; esac done diff --git a/update-desktop-files.changes b/update-desktop-files.changes index b692186..ce3436b 100644 --- a/update-desktop-files.changes +++ b/update-desktop-files.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 8 15:21:18 CEST 2010 - mls@suse.de + +- mimetypes.prov: filter bad desktop files, use mimehandler instead + of mimetype + ------------------------------------------------------------------- Tue Nov 3 12:19:58 UTC 2009 - coolo@novell.com diff --git a/update-desktop-files.spec b/update-desktop-files.spec index 21a4e92..12df36d 100644 --- a/update-desktop-files.spec +++ b/update-desktop-files.spec @@ -1,7 +1,7 @@ # # spec file for package update-desktop-files (Version 11.1) # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,9 +20,9 @@ Name: update-desktop-files Version: 11.1 -Release: 5 +Release: 6 Summary: A Build Tool to Update Desktop Files -License: GPL v2 or later +License: GPLv2+ Group: Development/Tools/Building BuildRoot: %{_tmppath}/%{name}-%{version}-build AutoReqProv: on