From 06699249d26d5084ec895f3a49383e1f45f5bf4089703683d584cf23ad25d604 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Tue, 13 Apr 2010 20:22:09 +0000 Subject: [PATCH] Accepting request 37478 from X11:common:Factory Copy from X11:common:Factory/update-desktop-files based on submit request 37478 from user vuntz OBS-URL: https://build.opensuse.org/request/show/37478 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=64 --- mimetypes.prov | 12 +++++++----- update-desktop-files.changes | 6 ++++++ update-desktop-files.spec | 6 +++--- 3 files changed, 16 insertions(+), 8 deletions(-) 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