From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:prefix commit in: bin/
Date: Mon, 3 Jul 2023 20:19:36 +0000 (UTC) [thread overview]
Message-ID: <1688415571.65b4a7839d11d6f2be0f0811bce8f66f06e40ca7.sam@gentoo> (raw)
commit: 65b4a7839d11d6f2be0f0811bce8f66f06e40ca7
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Jun 25 20:16:51 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jul 3 20:19:31 2023 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=65b4a783
bin/save-ebuild-env.sh: refrain from using the compgen builtin
For the compgen builtin to be available requires that bash be compiled
with --enable-readline. Rather than rely on compgen to generate a list
of function names, parse their names out of declare -F instead. This
eliminates an unnecessary divergence from the master branch.
Specify -v for the following unset command, so that bash is coerced into
unsetting only variables, as is intended.
Expand the applicable variable names with "${!___@}". Owing to the
constraints placed on identifiers, it's not particularly important that
it be done this way, but I think it better expresses the intent.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Bug: https://bugs.gentoo.org/909148
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/save-ebuild-env.sh | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 36eedc7fa..294cab255 100755
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -82,13 +82,13 @@ __save_ebuild_env() {
___eapi_has_usex && unset -f usex
- # BEGIN PREFIX LOCAL: compgen is not compiled in during bootstrap
- if type compgen >& /dev/null ; then
- # Clear out the triple underscore namespace as it is reserved by the PM.
- unset -f $(compgen -A function ___)
- unset ${!___*}
- fi
- # END PREFIX LOCAL
+ # Clear out the triple underscore namespace as it is reserved by the PM.
+ while IFS=' ' read -r _ _ REPLY; do
+ if [[ ${REPLY} == ___* ]]; then
+ unset -f "${REPLY}"
+ fi
+ done < <(declare -F)
+ unset -v REPLY "${!___@}"
# portage config variables and variables set directly by portage
unset ACCEPT_LICENSE BUILD_PREFIX COLS \
next reply other threads:[~2023-07-03 20:19 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 20:19 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-08-16 17:04 [gentoo-commits] proj/portage:prefix commit in: bin/ Fabian Groffen
2022-07-28 18:33 Fabian Groffen
2022-07-28 18:23 Fabian Groffen
2022-07-25 16:55 Fabian Groffen
2022-07-25 16:49 Fabian Groffen
2021-07-06 7:10 Fabian Groffen
2021-01-04 10:42 Fabian Groffen
2020-12-07 16:49 Fabian Groffen
2020-11-28 19:47 Fabian Groffen
2020-11-28 19:37 Fabian Groffen
2019-07-01 13:11 Fabian Groffen
2019-06-03 19:21 Fabian Groffen
2019-06-03 19:00 Fabian Groffen
2018-12-23 19:55 Fabian Groffen
2018-12-06 12:46 Fabian Groffen
2017-03-24 7:43 Fabian Groffen
2017-03-23 15:25 Fabian Groffen
2014-10-24 19:14 Fabian Groffen
2014-10-02 18:47 Fabian Groffen
2014-09-30 16:04 Fabian Groffen
2013-10-06 19:01 Fabian Groffen
2013-09-18 18:34 Fabian Groffen
2013-09-18 18:34 Fabian Groffen
2013-09-12 7:32 Fabian Groffen
2013-08-16 12:50 Fabian Groffen
2013-03-31 10:03 Fabian Groffen
2013-03-24 8:45 Fabian Groffen
2013-03-24 8:34 Fabian Groffen
2013-01-10 21:13 Fabian Groffen
2012-12-26 15:06 Fabian Groffen
2012-12-02 12:58 Fabian Groffen
2012-10-22 17:57 Fabian Groffen
2012-09-30 12:12 Fabian Groffen
2012-09-12 18:26 Fabian Groffen
2012-08-12 7:44 Fabian Groffen
2012-07-08 17:25 Fabian Groffen
2012-04-03 18:09 Fabian Groffen
2011-12-10 13:14 Fabian Groffen
2011-12-09 20:36 Fabian Groffen
2011-12-03 16:49 Fabian Groffen
2011-12-03 15:22 Fabian Groffen
2011-09-23 18:33 Fabian Groffen
2011-09-23 18:23 Fabian Groffen
2011-09-13 18:45 Fabian Groffen
2011-08-20 18:35 Fabian Groffen
2011-04-24 17:20 Fabian Groffen
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=1688415571.65b4a7839d11d6f2be0f0811bce8f66f06e40ca7.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