Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] utilizing BASH_COMPAT to smooth upgrades
Date: Tue, 20 Oct 2015 22:03:50
Message-Id: 22054.47670.476853.951929@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-dev] utilizing BASH_COMPAT to smooth upgrades by Mike Frysinger
1 >>>>> On Tue, 20 Oct 2015, Mike Frysinger wrote:
2
3 >> EAPI 6: Bash version is 4.2.
4
5 > do we want to mandate the BASH_COMPAT aspect in PMS ?
6 > or at least make into a recommendation ?
7
8 If I understand [1] correctly, coverage of BASH_COMPAT is incomplete:
9 It only changes incompatible behaviour back to the old version, but it
10 won't disallow using new features.
11
12 Therefore I'd make it a recommendation at most. Something along the
13 lines of: "The interpreter is assumed to be GNU bash, version as
14 listed in table xyz, or any later version. If possible, the package
15 manager should set the shell's compatibility level to the exact
16 version specified."
17
18 > https://bugs.gentoo.org/431340#c20
19 > local maj=4 min=2
20 > if ([[ ${BASH_VERSINFO[0]} -lt ${maj} ]] ||
21 > [[ ${BASH_VERSINFO[0]} -eq ${maj} && ${BASH_VERSINFO[1]} -lt ${min ]]) ; then
22
23 Why the subshell here?
24
25 > die ">=bash-${maj}.${min} is required"
26 > fi
27 > BASH_COMPAT="${maj}.${min}"
28
29 Ulrich
30
31 [1] https://lists.gnu.org/archive/html/bug-bash/2015-10/msg00106.html

Replies

Subject Author
Re: [gentoo-dev] utilizing BASH_COMPAT to smooth upgrades Mike Frysinger <vapier@g.o>