2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
7 [[ " ${USE} " == *" prefix "* ]] || \
8 case "$EAPI" in 0|1|2) ED=${D} ;; esac
10 if has chflags $FEATURES ; then
11 # Save all the file flags for restoration at the end of prepall.
12 mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree"
13 # Remove all the file flags so that prepall can do anything necessary.
14 chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}"
15 chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null
23 if has chflags $FEATURES ; then
24 # Restore all the file flags that were saved at the beginning of prepall.
25 mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null