summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2020-05-12 18:54:29 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2020-10-18 00:21:09 +0100
commit9a6c0ea13236f0ffb881b44a113d96df55acf3a7 (patch)
tree59dd47b91dc0c68f68bc07d0f99467202a3435d6
parentprofiles/common: enable ptpax xtpax USE flag (diff)
downloadportage-9a6c0ea13236f0ffb881b44a113d96df55acf3a7.tar.xz
profiles/common: restore work tree factory-default permission
-rw-r--r--profiles/common/profile.bashrc9
1 files changed, 7 insertions, 2 deletions
diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc
index eede29b5..e067653f 100644
--- a/profiles/common/profile.bashrc
+++ b/profiles/common/profile.bashrc
@@ -274,8 +274,13 @@ function __install_own_file () {
"${_ed}/${REPLY}" \
|| die
- chmod --reference="${_FACTORY_DIRECTORY}/${REPLY}" "${_ed}/${REPLY}" \
- || die
+ if [[ -e "${_ed}/usr/share/gentoo-factory/${CATEGORY}/${PF}/${REPLY}" ]] ; then
+ chmod --reference="${_ed}/usr/share/gentoo-factory/${CATEGORY}/${PF}/${REPLY}" "${_ed}/${REPLY}" \
+ || die
+ else
+ chmod --reference="${_FACTORY_DIRECTORY}/${REPLY}" "${_ed}/${REPLY}" \
+ || die
+ fi
elif [[ -L "${_FACTORY_DIRECTORY}/${REPLY}" ]] ; then
cp -P "${_FACTORY_DIRECTORY}/${REPLY}" \
"${_ed}/${REPLY}" \