forked from pool/xdg-utils
fix bnc#906625
OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=37
This commit is contained in:
parent
23bae38918
commit
f622d8643f
36
xdg-mime-generic-do-not-return-more-than-one-default.patch
Normal file
36
xdg-mime-generic-do-not-return-more-than-one-default.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From ea7e2924df069a66423459c00e4e512063720fb1 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Slaby <jslaby@suse.cz>
|
||||
Date: Thu, 27 Nov 2014 16:31:52 +0100
|
||||
Subject: [PATCH 1/1] xdg-mime: generic, do not return more than one default
|
||||
References: bnc#906625
|
||||
|
||||
Now, 'xdg-mime query default' can return more than one application:
|
||||
$ XDG_UTILS_DEBUG_LEVEL=5 xdg-mime query default text/plain
|
||||
Checking /home/xslaby/.local/share//applications/mimeapps.list
|
||||
Checking /usr/share/applications/defaults.list and /usr/share/applications/mimeinfo.cache
|
||||
writer.desktop kde4-active-documentviewer_txt.desktop
|
||||
|
||||
It is due to an unlimited grep in defapp_generic(). So limit the
|
||||
output by 'head -1'.
|
||||
|
||||
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||||
---
|
||||
scripts/xdg-mime.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/scripts/xdg-mime.in b/scripts/xdg-mime.in
|
||||
index 0290d7742e45..da472edf267a 100644
|
||||
--- a/scripts/xdg-mime.in
|
||||
+++ b/scripts/xdg-mime.in
|
||||
@@ -383,7 +383,7 @@ defapp_generic()
|
||||
for x in `echo "$xdg_system_dirs" | sed 's/:/ /g'`; do
|
||||
for prefix in "$XDG_MENU_PREFIX" ""; do
|
||||
DEBUG 2 "Checking $x/applications/${prefix}defaults.list and $x/applications/${prefix}mimeinfo.cache"
|
||||
- trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | cut -d '=' -f 2 | cut -d ';' -f 1`
|
||||
+ trader_result=`grep "$MIME=" $x/applications/${prefix}defaults.list $x/applications/${prefix}mimeinfo.cache 2> /dev/null | head -1 | cut -d '=' -f 2 | cut -d ';' -f 1`
|
||||
if [ -n "$trader_result" ] ; then
|
||||
echo $trader_result
|
||||
exit_success
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f3996c8790056e693eb7251bbc1f9ac01590446fc749c5ea9d5804efac77bce6
|
||||
size 261932
|
3
xdg-utils-20141009.tar.xz
Normal file
3
xdg-utils-20141009.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb6b6abaf4db5c824fed71ac8656324267bf92989d4575dab783c8d87b6cb0ab
|
||||
size 261928
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 27 15:41:10 UTC 2014 - jslaby@suse.com
|
||||
|
||||
- Update to 20141009:
|
||||
* more of plasma5
|
||||
- xdg-mime-generic-do-not-return-more-than-one-default.patch (bnc#906625)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 23 16:32:40 UTC 2014 - hrvoje.senjan@gmail.com
|
||||
|
||||
|
@ -25,7 +25,7 @@ BuildRequires: w3m
|
||||
Summary: Utilities to uniformly interface desktop environments
|
||||
License: MIT
|
||||
Group: System/GUI/Other
|
||||
Version: 20140922
|
||||
Version: 20141009
|
||||
Release: 0
|
||||
BuildArch: noarch
|
||||
Url: http://portland.freedesktop.org/
|
||||
@ -33,7 +33,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# http://portland.freedesktop.org/download/xdg-utils-%%{version}.tgz
|
||||
Source0: xdg-utils-%{version}.tar.xz
|
||||
Patch0: install-some-more-scripts.diff
|
||||
Patch8: xdg-screensaver-gnome-perl.diff
|
||||
Patch1: xdg-screensaver-gnome-perl.diff
|
||||
Patch2: xdg-mime-generic-do-not-return-more-than-one-default.patch
|
||||
Requires: perl
|
||||
Requires: perl-Net-DBus
|
||||
Requires: perl-X11-Protocol
|
||||
@ -57,7 +58,8 @@ these utilities work properly in their environment.
|
||||
%prep
|
||||
%setup -q -n %name-%{version}
|
||||
%patch0 -p1
|
||||
%patch8 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure
|
||||
|
Loading…
Reference in New Issue
Block a user