Gentoo Archives: gentoo-portage-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels
Date: Wed, 11 Nov 2015 18:14:29
Message-Id: 20151111181426.GB5154@vapier.lan
In Reply to: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels by Ulrich Mueller
1 On 11 Nov 2015 07:33, Ulrich Mueller wrote:
2 > >>>>> On Tue, 10 Nov 2015, Mike Frysinger wrote:
3 > > + # Set the compat level in case things change with newer ones. We must not
4 > > + # export this into the env otherwise we might break other shell scripts we
5 > > + # execute (e.g. ones in /usr/bin).
6 > > + BASH_COMPAT="${maj}.${min}"
7 > > +
8 > > + # The variable above is new to bash-4.3. For older versions, we have to use
9 > > + # a compat knob. Further, the compat knob only exists with older versions
10 > > + # (e.g. bash-4.3 has compat42 but not compat43). This means we only need to
11 > > + # turn the knob with older EAPIs, and only when running newer bash versions:
12 > > + # there is no bash-3.3 (it went 3.2 to 4.0), and when requiring bash-4.2, the
13 > > + # var works with bash-4.3+, and you don't need to set compat to 4.2 when you
14 > > + # are already running 4.2.
15 > > + if __eapi_bash_3_2 && [[ ${BASH_VERSINFO[0]} -gt 3 ]] ; then
16 > > + shopt -s compat32
17 > > + fi
18 >
19 > Wouldn't this profit from an additional test for <bash-4.3? If I
20 > understood the upstream discussion correctly, they were thinking about
21 > dropping the compat* options in some future version?
22
23 my take away was that they weren't going to be adding new compat levels.
24 i don't think they were planning on dropping existing ones.
25 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature