[caja-dropbox] 01/01: rework 2003_fake_xdg_current_desktop.patch to only modify the environment passed to Popen

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Tue Mar 28 07:54:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch ubuntu/zesty
in repository caja-dropbox.

commit a3485f544a50ff43e4bfc2697ff544ba68dde9b7
Author: Martin Wimpress <martin.wimpress at ubuntu.com>
Date:   Tue Mar 28 08:54:19 2017 +0100

    rework 2003_fake_xdg_current_desktop.patch to only modify the environment passed to Popen
---
 debian/patches/2003_fake_xdg_current_desktop.patch | 33 +++++++++++++---------
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/debian/patches/2003_fake_xdg_current_desktop.patch b/debian/patches/2003_fake_xdg_current_desktop.patch
index 1a44794..01caba1 100644
--- a/debian/patches/2003_fake_xdg_current_desktop.patch
+++ b/debian/patches/2003_fake_xdg_current_desktop.patch
@@ -1,21 +1,28 @@
-Description: Fake XDG_CURRENT_DESKTOP. Closes (LP: #1559249)
-Author: Martin Wimpress <code at flexion.org>
+Description: Coerce XDG_CURRENT_DESKTOP to "Unity". (LP: #1559249)
+Author: Martin Wimpress <martin.wimpress at ubuntu.com>
 Abstract:
- This works around broken dropbox binary that will not correctly activate
- the tray icon or indicator icon on Ubuntu 17.04. This patch works around
- that issue by coercing XDG_CURRENT_DESKTOP to report as "Unity".
+ This works around broken dropbox binary that will not correctly
+ activate the tray icon or indicator icon on Ubuntu 17.04. This patch
+ works around that issue by coercing XDG_CURRENT_DESKTOP to report as
+ "Unity".
  .
  This patch is valid for Debian and Ubuntu.
- 
-diff --git a/caja-dropbox.in b/caja-dropbox.in
-index 5026ab7..ed36e44 100755
---- a/caja-dropbox.in
-+++ b/caja-dropbox.in
-@@ -728,6 +728,7 @@ def start_dropbox():
+
+
+--- a/caja-dropbox.in	2017-03-28 02:00:33.223411568 +0100
++++ b/caja-dropbox.in	2017-03-28 02:03:34.637407866 +0100
+@@ -728,8 +728,13 @@
      if os.access(db_path, os.X_OK):
          f = open("/dev/null", "w")
          # we don't reap the child because we're gonna die anyway, let init do it
-+        os.environ["XDG_CURRENT_DESKTOP"] = "Unity"
++
++        # Fix indicator icon and menu. (LP: #1559249)
++        new_env = os.environ.copy()
++        new_env['XDG_CURRENT_DESKTOP'] = 'Unity'
++
          a = subprocess.Popen([db_path], preexec_fn=os.setsid, cwd=os.path.expanduser("~"),
-                              stderr=sys.stderr, stdout=f, close_fds=True)
+-                             stderr=sys.stderr, stdout=f, close_fds=True)
++                             stderr=sys.stderr, stdout=f, close_fds=True, env=new_env)
  
+         # in seconds
+         interval = 0.5

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/caja-dropbox.git



More information about the pkg-mate-commits mailing list