Accepting request 740989 from home:Vogtinator:plasma5.17
- Add patch to fix reading environment variables with newline (boo#1154345, kde#413130): * 0001-Fix-reading-environment-variables-with-newline.patch OBS-URL: https://build.opensuse.org/request/show/740989 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=478
This commit is contained in:
parent
11e6f70420
commit
b27cb3136e
53
0001-Fix-reading-environment-variables-with-newline.patch
Normal file
53
0001-Fix-reading-environment-variables-with-newline.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 3f7e44cade8aae45396f6bbdd22c60ce4cd508d2 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Fri, 18 Oct 2019 09:36:27 +0200
|
||||
Subject: [PATCH] Fix reading environment variables with newline
|
||||
|
||||
Summary:
|
||||
Use '\0' as separator as '\n' is likely to appear in values.
|
||||
|
||||
BUG: 413130
|
||||
|
||||
Test Plan:
|
||||
/etc/profile.d/mc.sh exported an mc() function,
|
||||
which resulted in "syntax error: unexpected end of file" in the Plasma session.
|
||||
Now the mc function is correctly set in the environment.
|
||||
|
||||
Reviewers: #plasma, apol
|
||||
|
||||
Subscribers: plasma-devel
|
||||
|
||||
Tags: #plasma
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D24750
|
||||
---
|
||||
startkde/plasma-sourceenv.sh | 2 +-
|
||||
startkde/startplasma.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/startkde/plasma-sourceenv.sh b/startkde/plasma-sourceenv.sh
|
||||
index 70c3b6487..b8a50aa0d 100644
|
||||
--- a/startkde/plasma-sourceenv.sh
|
||||
+++ b/startkde/plasma-sourceenv.sh
|
||||
@@ -3,4 +3,4 @@ do
|
||||
. $i >/dev/null
|
||||
done
|
||||
|
||||
-env
|
||||
+env -0
|
||||
diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp
|
||||
index e0f7004b4..cb4eda2b8 100644
|
||||
--- a/startkde/startplasma.cpp
|
||||
+++ b/startkde/startplasma.cpp
|
||||
@@ -91,7 +91,7 @@ void sourceFiles(const QStringList &files)
|
||||
p.waitForFinished(-1);
|
||||
|
||||
const auto fullEnv = p.readAllStandardOutput();
|
||||
- auto envs = fullEnv.split('\n');
|
||||
+ auto envs = fullEnv.split('\0');
|
||||
|
||||
for (auto &env: envs) {
|
||||
if (env.startsWith("_=") || env.startsWith("SHLVL"))
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 18 07:48:42 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Add patch to fix reading environment variables with newline
|
||||
(boo#1154345, kde#413130):
|
||||
* 0001-Fix-reading-environment-variables-with-newline.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 15 13:44:23 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
|
@ -42,6 +42,7 @@ Source3: baselibs.conf
|
||||
Source4: plasmafullwayland.desktop
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch1: 0001-gmenu-dbusmenu-proxy-Don-t-create-.gtkrc-2.0.patch
|
||||
Patch2: 0001-Fix-reading-environment-variables-with-newline.patch
|
||||
# PATCHES 501-??? are PATCH-FIX-OPENSUSE
|
||||
Patch501: 0001-Use-qdbus-qt5.patch
|
||||
Patch502: 0001-Ignore-default-sddm-face-icons.patch
|
||||
|
Loading…
x
Reference in New Issue
Block a user