commit: 49ef3c0f9a128c199ead699e371f27796590309f
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Jul 27 20:13:24 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 30 08:14:21 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=49ef3c0f
phase-helpers.sh: quote the expansions of DISTDIR in unpack()
The value of DISTDIR must never be treated as the sub-pattern of an
extended glob but, rather, as a literal string.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/phase-helpers.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index da90cf3a5c..715c434ca6 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -366,10 +366,10 @@ unpack() {
elif ___eapi_unpack_supports_absolute_paths; then
# EAPI 6 allows absolute and deep relative paths
srcdir=
- if [[ ${f} == ${DISTDIR%/}/* ]]; then
+ if [[ ${f} == "${DISTDIR%/}"/* ]]; then
eqawarn "QA Notice: unpack called with
redundant \${DISTDIR} in path"
fi
- elif [[ ${f} == ${DISTDIR%/}/* ]]; then
+ elif [[ ${f} == "${DISTDIR%/}"/* ]]; then
die "Arguments to unpack() cannot begin with
\${DISTDIR} in EAPI ${EAPI}"
elif [[ ${f} == /* ]]; then
die "Arguments to unpack() cannot be absolute in EAPI
${EAPI}"