From: Ulrich Mueller <ulm@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels
Date: Wed, 11 Nov 2015 07:33:29 +0100 [thread overview]
Message-ID: <22082.57657.480552.681902@a1i15.kph.uni-mainz.de> (raw)
In-Reply-To: <1447216769-7116-1-git-send-email-vapier@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]
>>>>> On Tue, 10 Nov 2015, Mike Frysinger wrote:
> + # Set the compat level in case things change with newer ones. We must not
> + # export this into the env otherwise we might break other shell scripts we
> + # execute (e.g. ones in /usr/bin).
> + BASH_COMPAT="${maj}.${min}"
> +
> + # The variable above is new to bash-4.3. For older versions, we have to use
> + # a compat knob. Further, the compat knob only exists with older versions
> + # (e.g. bash-4.3 has compat42 but not compat43). This means we only need to
> + # turn the knob with older EAPIs, and only when running newer bash versions:
> + # there is no bash-3.3 (it went 3.2 to 4.0), and when requiring bash-4.2, the
> + # var works with bash-4.3+, and you don't need to set compat to 4.2 when you
> + # are already running 4.2.
> + if __eapi_bash_3_2 && [[ ${BASH_VERSINFO[0]} -gt 3 ]] ; then
> + shopt -s compat32
> + fi
Wouldn't this profit from an additional test for <bash-4.3? If I
understood the upstream discussion correctly, they were thinking about
dropping the compat* options in some future version?
That is, the conditional should look like:
if __eapi_bash_3_2 \
&& [[ ${BASH_VERSINFO[0]} -eq 4 \
&& ${BASH_VERSINFO[1]} -lt 3 ]] ; then
shopt -s compat32
fi
Ulrich
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2015-11-11 6:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 4:39 [gentoo-portage-dev] [PATCH] ebuild: set up bash compat levels Mike Frysinger
2015-11-11 6:33 ` Ulrich Mueller [this message]
2015-11-11 18:14 ` Mike Frysinger
2015-11-11 9:32 ` Michał Górny
2015-11-11 11:52 ` Ulrich Mueller
2015-11-13 22:59 ` Michał Górny
2015-11-14 21:00 ` Ulrich Mueller
2015-11-11 18:17 ` Mike Frysinger
2015-11-11 19:42 ` Zac Medico
2015-11-11 20:55 ` Mike Frysinger
2015-11-11 21:04 ` Zac Medico
2015-11-11 21:11 ` Mike Frysinger
2015-11-12 6:33 ` Zac Medico
2015-11-12 6:40 ` Zac Medico
2015-11-13 0:06 ` Mike Frysinger
2015-11-13 0:58 ` Zac Medico
2015-11-13 1:51 ` Mike Frysinger
2015-11-13 8:12 ` Ulrich Mueller
2015-11-13 17:18 ` Zac Medico
2015-11-13 2:07 ` Tim Harder
2015-11-13 2:25 ` Zac Medico
2015-11-13 2:33 ` Tim Harder
2015-11-13 2:38 ` Zac Medico
2015-11-13 2:55 ` Mike Frysinger
2015-11-11 21:00 ` [gentoo-portage-dev] [PATCH v2] " Mike Frysinger
2015-11-12 7:13 ` Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22082.57657.480552.681902@a1i15.kph.uni-mainz.de \
--to=ulm@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox