From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: /, bin/
Date: Thu, 13 Jun 2024 02:34:50 +0000 (UTC) [thread overview]
Message-ID: <1718245418.19e750b6880c1ffba55c4d309fbf33d5e746ee33.sam@gentoo> (raw)
commit: 19e750b6880c1ffba55c4d309fbf33d5e746ee33
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 13 02:20:27 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 13 02:23:38 2024 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=19e750b6
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 <sam <AT> gentoo.org>
NEWS | 6 ++++++
bin/ebuild.sh | 8 ++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/NEWS b/NEWS
index 5aa485d264..b4b378e7a0 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,12 @@ Features:
as well as / for all EAPIs rather than instead of / for EAPI 6 and below
(bug #435066).
+Bug fixes:
+* ebuild: Handle Bash 5.2's change in behavior which enables the shopt
+ 'globskipdots' by default. This is needed to avoid breaking existing
+ working ebuilds. Future EAPIs will need to adjust the logic
+ added by this change. See bug #907061.
+
portage-3.0.65 (2024-06-04)
--------------
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index c9f7c04e28..8b1e0861a8 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
}
next reply other threads:[~2024-06-13 2:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-13 2:34 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-27 21:18 [gentoo-commits] proj/portage:master commit in: /, bin/ Ulrich Müller
2023-12-04 6:45 Sam James
2023-05-17 6:20 Sam James
2023-05-01 7:21 Sam James
2022-12-05 4:04 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-09-29 20:45 Sam James
2022-08-19 17:59 Mike Gilbert
2022-07-18 20:42 Sam James
2020-08-01 1:57 Zac Medico
2017-09-02 21:37 Michał Górny
2014-08-19 7:01 Michał Górny
2014-08-12 21:55 Alexander Berntsen
2012-03-27 15:19 Zac Medico
2012-03-27 14:40 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=1718245418.19e750b6880c1ffba55c4d309fbf33d5e746ee33.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-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