diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-09-30 10:23:01 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-09-30 10:23:01 -0700 |
commit | 6983b1a1dd21f931ba751b727bd1a3c460383840 (patch) | |
tree | 7eaea28095717052b937617c20a1c94831e4dd58 | |
parent | 314791e319e3ac7ce75f3a6f9ae9cc5c2b837df6 (diff) | |
download | portage-6983b1a1dd21f931ba751b727bd1a3c460383840.tar.gz portage-6983b1a1dd21f931ba751b727bd1a3c460383840.tar.bz2 portage-6983b1a1dd21f931ba751b727bd1a3c460383840.zip |
phase-functions.sh: chgrp $T/environment
This partially reverts commit 314791e319e3ac7ce75f3a6f9ae9cc5c2b837df6,
in order to cover possible cases where it may not actually be
redundant, like if ebuild(1) is used to call pkg_setup as root, and
then a different user calls src_unpack. We use PORTAGE_GRPNAME if set,
in order to avoid triggering irrelevant warnings for unprivileged
prefix users (see chown and chgrp wrappers in commit
45bedf9cdc10fafd94858f67d62b36d35dd99544). This mirrors the approach
taken in commit 1c3c3b802014ac6356af09d149aaaffce6c14dc3 of the prefix
branch.
-rw-r--r-- | bin/phase-functions.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 7a1d6c538..714f7a609 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -971,6 +971,8 @@ __ebuild_main() { __save_ebuild_env | __filter_readonly_variables \ --filter-features > "$T/environment" assert "__save_ebuild_env failed" + chgrp "${PORTAGE_GRPNAME:-portage}" "$T/environment" + chmod g+w "$T/environment" fi [[ -n $PORTAGE_EBUILD_EXIT_FILE ]] && > "$PORTAGE_EBUILD_EXIT_FILE" if [[ -n $PORTAGE_IPC_DAEMON ]] ; then |