aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-08-30 15:14:06 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-08-30 15:14:06 +0000
commit15d37ff1a670023cbb135bd8698a908c64750391 (patch)
treea477c2bb65721e22783a3af51e26e176444137d0
parentc211600956d0997be222c267f52e6cd6ad3fe1cc (diff)
downloadpaludis-15d37ff1a670023cbb135bd8698a908c64750391.tar.gz
paludis-15d37ff1a670023cbb135bd8698a908c64750391.tar.xz
Reset permissions on the contents of the current directory after unpack. Fixes: Gentoo#190746
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack4
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index 1b1937c..449925a 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -103,7 +103,10 @@ export UNPACKTODIR="${PWD}"
if [[ "${1}" == "--binary" ]] ; then
export UNPACKFROMDIR="${PKGDIR}"
export UNPACKTODIR="${IMAGE}"
+ IS_BINARY=yes
shift
+else
+ IS_BINARY=
fi
unset UNPACKONLY
@@ -130,4 +133,5 @@ for x in "$@" ; do
unpack_one "${x}"
done
+[[ -z ${IS_BINARY} ]] && find ${UNPACKTODIR} -mindepth 1 ! -type l -print0 | xargs -0 chmod a+rX,u+w,go-w