From 3fb07943d1cb7b670fe2d98870dcd6b3c529a743716388bbe1906e469b53b163 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 4 Nov 2019 09:43:20 +0000 Subject: [PATCH] Accepting request 745124 from home:cgiboudeaux:branches:X11:common:Factory Add an inconsistent change requested by the package maintainer. OBS-URL: https://build.opensuse.org/request/show/745124 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/xdg-utils?expand=0&rev=71 --- ...adconfig-if-KDE_SESSION_VERSION-is-5.patch | 40 +++++++++++++++++++ xdg-utils.changes | 6 +++ xdg-utils.spec | 5 ++- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch diff --git a/0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch b/0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch new file mode 100644 index 0000000..e03bfd9 --- /dev/null +++ b/0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch @@ -0,0 +1,40 @@ +From e47c61cb3c780cd091038c8b580eca6e10679a11 Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Wed, 30 Oct 2019 17:11:08 +0100 +Subject: [PATCH] Don't run 'kreadconfig' if KDE_SESSION_VERSION is >= 5. + +'kreadconfig' is a KDE4 executable. The program is called 'kreadconfig5' in +KDE Frameworks 5.xx. +--- + scripts/xdg-terminal.in | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/scripts/xdg-terminal.in b/scripts/xdg-terminal.in +index 36a9833..05a3c44 100644 +--- a/scripts/xdg-terminal.in ++++ b/scripts/xdg-terminal.in +@@ -30,7 +30,20 @@ _USAGE + + terminal_kde() + { +- terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole` ++ if [ -n "$KDE_SESSION_VERSION" ] && [ "$KDE_SESSION_VERSION" -ge 5 ]; then ++ local kreadconfig=kreadconfig$KDE_SESSION_VERSION ++ else ++ local kreadconfig=kreadconfig ++ fi ++ ++ if which $kreadconfig >/dev/null 2>&1; then ++ local terminal=$($kreadconfig --file kdeglobals \ ++ --group General \ ++ --key TerminalApplication \ ++ --default konsole) ++ else ++ exit_failure_operation_impossible "'$kreadconfig' was not found or is not executable" ++ fi + + terminal_exec=`which $terminal 2>/dev/null` + +-- +2.23.0 + diff --git a/xdg-utils.changes b/xdg-utils.changes index b2f518b..50765c0 100644 --- a/xdg-utils.changes +++ b/xdg-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 30 16:12:34 UTC 2019 - Christophe Giboudeaux + +- Add 0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch + to read the KDE Frameworks config file if necessary (boo#1155462) + ------------------------------------------------------------------- Mon Sep 30 10:47:49 UTC 2019 - jslaby@suse.com diff --git a/xdg-utils.spec b/xdg-utils.spec index 958e39a..198da67 100644 --- a/xdg-utils.spec +++ b/xdg-utils.spec @@ -27,6 +27,8 @@ Url: https://www.freedesktop.org/wiki/Software/xdg-utils/ Source: xdg-utils-%{version}.tar.xz # PATCH-FEATURE-OPENSUSE install-some-more-scripts.diff jslaby@suse.cz Patch0: install-some-more-scripts.diff +# PATCH-FIX-UPSTREAM 0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch +Patch1: 0001-Don-t-run-kreadconfig-if-KDE_SESSION_VERSION-is-5.patch BuildRequires: make # for xmlto to be able to generate text from html BuildRequires: w3m @@ -55,8 +57,7 @@ This means that: environment. %prep -%setup -q -%autopatch -p1 +%autosetup -p1 %build %configure