From 9a6c0ea13236f0ffb881b44a113d96df55acf3a7 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Tue, 12 May 2020 18:54:29 +0100 Subject: profiles/common: restore work tree factory-default permission --- profiles/common/profile.bashrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'profiles') 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}" \ -- cgit v1.2.3