Package: libvte-2.91-common
Version: 0.75.91-2
Severity: important
Tags: patch

Dear Maintainer,

At the start of my $HOME/.bashrc I have configured "set -u" to catch the use of undefined variables.

Whenever I open a new gnome-terminal window using bash as the shell, the script vte-2.91.sh will emit two messages about dereferencing an undefined variable PS0.

This is a recent regression and similar in nature to the earlier
bug #941247 that has been fixed.

The script appears to be part of the Debian packaging; I do not find it in
the upstream repository https://gitlab.gnome.org/GNOME/vte/-/tree/master

The attached patch fixes the problem for me. I think that it would be good
to test the script with "set -u" somehow, to prevent future regressions
like this.

Best regards,

        Marko

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.6.15-amd64 (SMP w/40 CPU threads; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libvte-2.91-common depends on:
ii  libc6  2.37-15

libvte-2.91-common recommends no packages.

libvte-2.91-common suggests no packages.

-- Configuration Files:
/etc/profile.d/vte-2.91.sh changed [not included]

-- no debconf information
--- /etc/profile.d/vte-2.91.sh
+++ /etc/profile.d/vte-2.91.sh
@@ -80,7 +80,7 @@
         # the column, important for handling TAB followed by BS keypresses.
         # Prepend to the user's PS0 to preserve whether it ends in '\r'.
         # Note that bash doesn't support the \[ \] markers here.
-        PS0='\e]133;C\e\\\r'"$PS0"
+        PS0='\e]133;C\e\\\r'"${PS0:-}"
     fi
 
 elif [[ -n "${ZSH_VERSION:-}" ]]; then

Reply via email to