forked from pool/xdg-utils
Accepting request 400599 from home:simotek:branches:X11:common:Factory
- Update to 20160520 * xdg-mime: support for KDE Frameworks 5.6 * xdg-mime does not write the file it reads in a query (BR95051) * xdg-screensaver: Add cinnamon-screensaver D-Bus API support. * xdg-open: standardize output redirection style - Fix issues related to xdg-open/xdg-mime generic code paths. * xdg-common-desktop-bin-vendor-dir.patch * xdg-mime-return-existing-desktop-files.patch OBS-URL: https://build.opensuse.org/request/show/400599 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=53
This commit is contained in:
parent
6c954e6ffc
commit
0ce2a2ff18
59
common-vendor-dirs-in-desktop_to_binary.patch
Normal file
59
common-vendor-dirs-in-desktop_to_binary.patch
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
commit 6e4d88e740b89a2766312fb544e4a22b7034d9e3
|
||||||
|
Author: Simon Lees <sflees@suse.de>
|
||||||
|
Date: Tue May 31 13:13:53 2016 +0930
|
||||||
|
|
||||||
|
common: implement vendor dirs in desktop_file_to_binary
|
||||||
|
|
||||||
|
diff --git a/scripts/xdg-utils-common.in b/scripts/xdg-utils-common.in
|
||||||
|
index cf08cd3..19400a4 100644
|
||||||
|
--- a/scripts/xdg-utils-common.in
|
||||||
|
+++ b/scripts/xdg-utils-common.in
|
||||||
|
@@ -50,7 +50,6 @@ binary_to_desktop_file()
|
||||||
|
|
||||||
|
#-------------------------------------------------------------
|
||||||
|
# map a .desktop file to a binary
|
||||||
|
-## FIXME: handle vendor dir case
|
||||||
|
desktop_file_to_binary()
|
||||||
|
{
|
||||||
|
search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
|
||||||
|
@@ -58,14 +57,32 @@ desktop_file_to_binary()
|
||||||
|
IFS=:
|
||||||
|
for dir in $search; do
|
||||||
|
unset IFS
|
||||||
|
- [ "$dir" ] && [ -d "$dir/applications" ] || continue
|
||||||
|
- file="$dir/applications/$desktop"
|
||||||
|
- [ -r "$file" ] || continue
|
||||||
|
- # Remove any arguments (%F, %f, %U, %u, etc.).
|
||||||
|
- command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
|
||||||
|
- command="`which "$command"`"
|
||||||
|
- readlink -f "$command"
|
||||||
|
- return
|
||||||
|
+ [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue
|
||||||
|
+ # Check if desktop file contains -
|
||||||
|
+ if [ "${desktop#*-}" != "$desktop" ]; then
|
||||||
|
+ vendor=${desktop%-*}
|
||||||
|
+ app=${desktop#*-}
|
||||||
|
+ if [ -r $dir/applications/$vendor/$app ]; then
|
||||||
|
+ file_path=$dir/applications/$vendor/$app
|
||||||
|
+ elif [ -r $dir/applnk/$vendor/$app ]; then
|
||||||
|
+ file_path=$dir/applnk/$vendor/$app
|
||||||
|
+ fi
|
||||||
|
+ else
|
||||||
|
+ for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do
|
||||||
|
+ file="$indir/$desktop"
|
||||||
|
+ if [ -r "$file" ]; then
|
||||||
|
+ file_path=$file
|
||||||
|
+ break
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
+ if [ -r "$file_path" ]; then
|
||||||
|
+ # Remove any arguments (%F, %f, %U, %u, etc.).
|
||||||
|
+ command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`"
|
||||||
|
+ command="`which "$command"`"
|
||||||
|
+ readlink -f "$command"
|
||||||
|
+ return
|
||||||
|
+ fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
36
xdg-mime-return-existing-desktop-files.patch
Normal file
36
xdg-mime-return-existing-desktop-files.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
commit 88deef3f4affa53680382540c2cd1ba9ce8e082d
|
||||||
|
Author: Simon Lees <sflees@suse.de>
|
||||||
|
Date: Fri Jun 3 16:45:08 2016 +0930
|
||||||
|
|
||||||
|
xdg-mime only return desktop file for existing apps
|
||||||
|
|
||||||
|
xdg-mime originally returned whatever was in the mimeapps.list
|
||||||
|
file, now it only returns the first desktop file that exists
|
||||||
|
and has a corrosponding binary that exists.
|
||||||
|
|
||||||
|
fdo#44163
|
||||||
|
|
||||||
|
Index: xdg-utils-20160520/scripts/xdg-mime.in
|
||||||
|
===================================================================
|
||||||
|
--- xdg-utils-20160520.orig/scripts/xdg-mime.in
|
||||||
|
+++ xdg-utils-20160520/scripts/xdg-mime.in
|
||||||
|
@@ -372,8 +372,17 @@ check_mimeapps_list()
|
||||||
|
}
|
||||||
|
' "$mimeapps_list" | cut -d ';' -f 1)
|
||||||
|
if [ -n "$result" ]; then
|
||||||
|
- echo "$result"
|
||||||
|
- exit_success
|
||||||
|
+ # $result could be a ; separated list of .desktop files
|
||||||
|
+ # use the first on the system
|
||||||
|
+ IFS=\;
|
||||||
|
+ for app in $result; do
|
||||||
|
+ IFS="$oldifs"
|
||||||
|
+ exists=$(desktop_file_to_binary "$app")
|
||||||
|
+ if [ -n "$exists" ]; then
|
||||||
|
+ echo "$app"
|
||||||
|
+ exit_success
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:5428951007586943edc65308aee15c5b7888bae8939a164c69212b7d60425440
|
|
||||||
size 268204
|
|
3
xdg-utils-20160520.tar.xz
Normal file
3
xdg-utils-20160520.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4d1967e9f1d546377182a45eeade0859a97f9b564f3073085b3c2d78de89681b
|
||||||
|
size 268508
|
@ -1,3 +1,14 @@
|
|||||||
|
Fri May 20 04:54:39 UTC 2016 - sflees@suse.de
|
||||||
|
|
||||||
|
- Update to 20160520
|
||||||
|
* xdg-mime: support for KDE Frameworks 5.6
|
||||||
|
* xdg-mime does not write the file it reads in a query (BR95051)
|
||||||
|
* xdg-screensaver: Add cinnamon-screensaver D-Bus API support.
|
||||||
|
* xdg-open: standardize output redirection style
|
||||||
|
- Fix issues related to xdg-open/xdg-mime generic code paths.
|
||||||
|
* xdg-common-desktop-bin-vendor-dir.patch
|
||||||
|
* xdg-mime-return-existing-desktop-files.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Feb 6 11:12:43 UTC 2016 - sor.alexei@meowr.ru
|
Sat Feb 6 11:12:43 UTC 2016 - sor.alexei@meowr.ru
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: xdg-utils
|
Name: xdg-utils
|
||||||
Version: 20151219
|
Version: 20160520
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Utilities to uniformly interface desktop environments
|
Summary: Utilities to uniformly interface desktop environments
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -33,6 +33,9 @@ Patch1: xdg-terminal-fix-gsettings.patch
|
|||||||
Patch2: fix-enlightenment-support.patch
|
Patch2: fix-enlightenment-support.patch
|
||||||
# PATCH-FIX-UPSTREAM xdg-terminal-fix-terminal--x-arg.patch fdo#93231 sor.alexei@meowr.ru -- https://bugs.freedesktop.org/show_bug.cgi?id=93231#c5
|
# PATCH-FIX-UPSTREAM xdg-terminal-fix-terminal--x-arg.patch fdo#93231 sor.alexei@meowr.ru -- https://bugs.freedesktop.org/show_bug.cgi?id=93231#c5
|
||||||
Patch3: xdg-terminal-fix-terminal--x-arg.patch
|
Patch3: xdg-terminal-fix-terminal--x-arg.patch
|
||||||
|
# PATCH-FIX-UPSTREAM (2 patches) xdg-mime / xdg-open generic implementations only return 1 item sflees@suse.de (boo#979265)
|
||||||
|
Patch4: common-vendor-dirs-in-desktop_to_binary.patch
|
||||||
|
Patch5: xdg-mime-return-existing-desktop-files.patch
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
# for xmlto to be able to generate text from html
|
# for xmlto to be able to generate text from html
|
||||||
BuildRequires: w3m
|
BuildRequires: w3m
|
||||||
@ -71,6 +74,8 @@ This means that:
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
|
Loading…
Reference in New Issue
Block a user