Bug#941247: /etc/profile.d/vte-2.91.sh dereferences undefined BASH_VERSION, ZSH_VERSION

Marko Mäkelä msmakela at gmail.com
Fri Sep 27 06:01:03 BST 2019


Package: libvte-2.91-common
Version: 0.58.0-1
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 ZSH_VERSION.

The script starts like this:

# Not bash or zsh?
[ -n "$BASH_VERSION" -o -n "$ZSH_VERSION" ] || return 0

# Not an interactive shell?
[[ $- == *i* ]] || return 0

# Not running under vte?
[ "${VTE_VERSION:-0}" -ge 3405 ] || return 0

Note: for VTE_VERSION, the correct pattern is being used. I believe that 
that pattern is POSIX shell compliant; at least it works in /bin/dash.

The attached patch fixes the problem for me.

I hope that you can apply this patch to the Debian packages or submit it 
upstream. I think that this bug has been present for years, but I did 
not investigate or file it until now.

Best regards,

	Marko

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

Kernel: Linux 5.2.0-2-amd64
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8), LANGUAGE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vte-2.91.sh.patch
Type: text/x-diff
Size: 696 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20190927/d224398d/attachment-0001.patch>


More information about the pkg-gnome-maintainers mailing list