diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-10-28 10:37:47 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-10-28 10:37:47 +0000 |
commit | 9d32ae401ea25227bd8bcfe7dfaad6c06e349a6b (patch) | |
tree | 5885d796649904e5c7bda8ed241b1f51f4a81552 /bin/prepall | |
parent | 8ac4cf5ef0e4ea62e3c28985134206b44ff93889 (diff) | |
download | portage-9d32ae401ea25227bd8bcfe7dfaad6c06e349a6b.tar.gz portage-9d32ae401ea25227bd8bcfe7dfaad6c06e349a6b.tar.bz2 portage-9d32ae401ea25227bd8bcfe7dfaad6c06e349a6b.zip |
Use mtree to save/restore bsd file flags before/after prepall and installation. Thanks to Diego Pettenò for this patch (related to bug #153109).
svn path=/main/trunk/; revision=4863
Diffstat (limited to 'bin/prepall')
-rwxr-xr-x | bin/prepall | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/prepall b/bin/prepall index 118b85d8b..68af880dc 100755 --- a/bin/prepall +++ b/bin/prepall @@ -5,6 +5,14 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then + # Save all the file flags for restoration at the end of prepall. + mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree" + # Remove all the file flags so that prepall can do anything necessary. + chflags -R noschg,nouchg,nosappnd,nouappnd "${D}" + chflags -R nosunlnk,nouunlnk "${D}" 2>/dev/null +fi + prepallman prepallinfo prepallstrip @@ -88,3 +96,8 @@ for d in "${D}"lib* "${D}"usr/lib* ; do done fi + +if type -p chflags &>/dev/null && type -p mtree &>/dev/null; then + # Restore all the file flags that were saved at the beginning of prepall. + mtree -U -e -p "${D}" -k flags < "${T}/bsdflags.mtree" &> /dev/null +fi |