aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2024-03-09 14:01:18 -0800
committerZac Medico <zmedico@gentoo.org>2024-03-09 14:49:03 -0800
commitd55d415a4f68b0d2b0c4dca00cce2d9aee934faa (patch)
tree320f2ed39c34186baeadc254acf6045b1de5c80c /bin
parent__dyn_install: Record REPO_REVISIONS in build-info (diff)
downloadportage-d55d415a4f68b0d2b0c4dca00cce2d9aee934faa.tar.gz
portage-d55d415a4f68b0d2b0c4dca00cce2d9aee934faa.tar.bz2
portage-d55d415a4f68b0d2b0c4dca00cce2d9aee934faa.zip
EbuildPhase/EbuildBinpkg: Ensure PKGDIR subdirectory permissions
Bug: https://bugs.gentoo.org/712222 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/misc-functions.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 4ce3acbfd..696f2a613 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# Miscellaneous shell functions that make use of the ebuild env but don't need
@@ -511,7 +511,11 @@ __dyn_package() {
export SANDBOX_ON="0"
[[ -z "${PORTAGE_BINPKG_TMPFILE}" ]] && \
die "PORTAGE_BINPKG_TMPFILE is unset"
- mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed"
+ if [[ ! -d ${PORTAGE_BINPKG_TMPFILE%/*} ]]; then
+ # Warn because we don't set PKGDIR directory permissions here.
+ ewarn "__dyn_package: Creating PORTAGE_BINPKG_TMPFILE parent dir: ${PORTAGE_BINPKG_TMPFILE%/*}"
+ mkdir -p "${PORTAGE_BINPKG_TMPFILE%/*}" || die "mkdir failed"
+ fi
if [[ ! -z "${BUILD_ID}" ]]; then
echo -n "${BUILD_ID}" > "${PORTAGE_BUILDDIR}"/build-info/BUILD_ID