>>>>> On Tue, 20 Oct 2015, Mike Frysinger wrote:

>> EAPI 6: Bash version is 4.2.

> do we want to mandate the BASH_COMPAT aspect in PMS ?
> or at least make into a recommendation ?

If I understand [1] correctly, coverage of BASH_COMPAT is incomplete:
It only changes incompatible behaviour back to the old version, but it
won't disallow using new features.

Therefore I'd make it a recommendation at most. Something along the
lines of: "The interpreter is assumed to be GNU bash, version as
listed in table xyz, or any later version. If possible, the package
manager should set the shell's compatibility level to the exact
version specified."

> https://bugs.gentoo.org/431340#c20
>   local maj=4 min=2
>   if ([[ ${BASH_VERSINFO[0]} -lt ${maj} ]] ||
>       [[ ${BASH_VERSINFO[0]} -eq ${maj} && ${BASH_VERSINFO[1]} -lt ${min ]]) 
> ; then

Why the subshell here?

>     die ">=bash-${maj}.${min} is required"
>   fi
>   BASH_COMPAT="${maj}.${min}"

Ulrich

[1] https://lists.gnu.org/archive/html/bug-bash/2015-10/msg00106.html

Attachment: pgp2zKHKJ4fvu.pgp
Description: PGP signature

Reply via email to