[arch-commits] Commit in gnome-terminal/trunk (2 files)

Jan Steffens heftig at archlinux.org
Tue Mar 10 21:20:11 UTC 2020


    Date: Tuesday, March 10, 2020 @ 21:20:11
  Author: heftig
Revision: 377333

3.36.0.1-2: FS#65774: Fix https://gitlab.gnome.org/GNOME/gnome-terminal/issues/228

Added:
  gnome-terminal/trunk/0001-screen-Fix-non-preserved-working-dir.patch
Modified:
  gnome-terminal/trunk/PKGBUILD

-------------------------------------------------+
 0001-screen-Fix-non-preserved-working-dir.patch |   47 ++++++++++++++++++++++
 PKGBUILD                                        |   12 ++++-
 2 files changed, 56 insertions(+), 3 deletions(-)

Added: 0001-screen-Fix-non-preserved-working-dir.patch
===================================================================
--- 0001-screen-Fix-non-preserved-working-dir.patch	                        (rev 0)
+++ 0001-screen-Fix-non-preserved-working-dir.patch	2020-03-10 21:20:11 UTC (rev 377333)
@@ -0,0 +1,47 @@
+From 0a68500b46668e4b9c027b630d0ba2ccb7bed555 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
+Date: Tue, 10 Mar 2020 21:02:19 +0000
+Subject: [PATCH] screen: Fix non-preserved working dir
+
+If `preserve_cwd` is false, the code would leave `data->cwd` unset. This
+resulted in VTE keeping the current pwd, which in the case of
+`gnome-terminal-server` running as a systemd user service is `/`.
+
+Fixes https://gitlab.gnome.org/GNOME/gnome-terminal/issues/228
+---
+ src/terminal-screen.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/terminal-screen.c b/src/terminal-screen.c
+index dc9f8447..6541c0a5 100644
+--- a/src/terminal-screen.c
++++ b/src/terminal-screen.c
+@@ -963,23 +963,22 @@ terminal_screen_exec (TerminalScreen *screen,
+     return FALSE;
+   }
+ 
+-  if (preserve_cwd) {
+-    data->cwd = g_strdup (cwd);
+-  } else {
++  if (!preserve_cwd) {
+     cwd = g_get_home_dir ();
+     envv = g_environ_unsetenv (envv, "PWD");
+   }
+ 
+   if (fd_list) {
+     const int *fds;
+ 
+     fds = g_unix_fd_list_peek_fds (fd_list, &data->fd_list_len);
+     data->fd_list = g_memdup (fds, (data->fd_list_len + 1) * sizeof (int));
+     data->fd_array = g_variant_get_fixed_array (fd_array, &data->fd_array_len, 2 * sizeof (int));
+   }
+ 
+   data->argv = g_strdupv (argv);
+   data->exec_argv = g_strdupv (exec_argv);
++  data->cwd = g_strdup (cwd);
+   data->envv = g_strdupv (envv);
+   data->as_shell = as_shell;
+   data->pty_flags = VTE_PTY_DEFAULT;
+-- 
+2.25.1
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-10 19:38:43 UTC (rev 377332)
+++ PKGBUILD	2020-03-10 21:20:11 UTC (rev 377333)
@@ -3,7 +3,7 @@
 
 pkgname=gnome-terminal
 pkgver=3.36.0.1
-pkgrel=1
+pkgrel=2
 pkgdesc="The GNOME Terminal Emulator"
 url="https://wiki.gnome.org/Apps/Terminal"
 arch=(x86_64)
@@ -13,8 +13,10 @@
              gnome-shell vala yelp-tools git)
 groups=(gnome)
 _commit=7d7b73d1005d8377e6f8303801e0da505f907611  # tags/3.36.0.1^0
-source=("git+https://gitlab.gnome.org/GNOME/gnome-terminal.git#commit=$_commit")
-sha256sums=('SKIP')
+source=("git+https://gitlab.gnome.org/GNOME/gnome-terminal.git#commit=$_commit"
+        0001-screen-Fix-non-preserved-working-dir.patch)
+sha256sums=('SKIP'
+            '32f26314ba3b33c95acb41510fa9e4f46d00bb575d3a32cc765b65303c30734a')
 
 pkgver() {
   cd $pkgname
@@ -23,6 +25,10 @@
 
 prepare() {
   cd $pkgname
+
+  # https://bugs.archlinux.org/task/65774
+  git apply -3 ../0001-screen-Fix-non-preserved-working-dir.patch
+
   NOCONFIGURE=1 ./autogen.sh
 }
 



More information about the arch-commits mailing list