Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 864601 Details for
Bug 909148
Drop compgen usage from Portage internals
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for prefix branch
portage-prefix.patch (text/plain), 1.82 KB, created by
kfm
on 2023-06-25 20:44:22 UTC
(
hide
)
Description:
Patch for prefix branch
Filename:
MIME Type:
Creator:
kfm
Created:
2023-06-25 20:44:22 UTC
Size:
1.82 KB
patch
obsolete
>From 89b5c8e3eb9d79ccc740e574ee9a22728878c27d Mon Sep 17 00:00:00 2001 >From: Kerin Millar <kfm@plushkava.net> >Date: Sun, 25 Jun 2023 21:16:51 +0100 >Subject: [PATCH] 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@plushkava.net> >Bug: https://bugs.gentoo.org/909148 >--- > 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 \ >-- >2.41.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 909148
:
864600
| 864601