From 19e750b6880c1ffba55c4d309fbf33d5e746ee33 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 13 Jun 2024 03:20:27 +0100 Subject: bin/ebuild.sh: disable globskipdots too in Bash 5.2 See 69cac73ba0a7bcf2e2cff88c60d389895a550623. globskipdots is a new option in bash-5.2 that is also default-on in that release. The default value is not gated by BASH_COMPAT (see bug #907061), hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds and eclasses. Bug: https://bugs.gentoo.org/907061 Signed-off-by: Sam James --- bin/ebuild.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index c9f7c04e2..8b1e0861a 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -18,7 +18,7 @@ source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit 1 # used instead. __check_bash_version() { # Figure out which min version of bash we require. - # Adjust patsub_replacement logic below on new EAPI! + # Adjust patsub_replacement/globskipdots logic below on new EAPI! local maj min if ___eapi_bash_3_2 ; then maj=3 min=2 @@ -52,16 +52,16 @@ __check_bash_version() { shopt -s compat32 fi - # patsub_replacement is a new option in bash-5.2 that is also default-on + # patsub_replacement and globskipdots are new options in bash-5.2 that are also default-on # in that release. The default value is not gated by BASH_COMPAT (see bug #881383), # hence we need to disable it for older Bashes to avoid behaviour changes in ebuilds # and eclasses. # # New EAPI note: a newer EAPI (after 8) may well adopt Bash 5.2 as its minimum version. # If it does, this logic will need to be adjusted to only disable patsub_replacement - # for < ${new_api}! + # and globskipdots for < ${new_api}! if (( BASH_VERSINFO[0] >= 6 || ( BASH_VERSINFO[0] == 5 && BASH_VERSINFO[1] >= 2 ) )) ; then - shopt -u patsub_replacement + shopt -u patsub_replacement globskipdots fi } -- cgit v1.2.3-65-gdbad