diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-04-30 07:10:46 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-04-30 07:10:46 +0000 |
commit | 7a4ca1e8a11796ffd234f459ff406cd9aa2fb692 (patch) | |
tree | f3547f3f6ad9f360e27c5bc3087fc697c0eacca5 /bin | |
parent | Create the myreporoot variable from portdir_overlay before doing (diff) | |
download | portage-multirepo-7a4ca1e8a11796ffd234f459ff406cd9aa2fb692.tar.gz portage-multirepo-7a4ca1e8a11796ffd234f459ff406cd9aa2fb692.tar.bz2 portage-multirepo-7a4ca1e8a11796ffd234f459ff406cd9aa2fb692.zip |
Make portage.bsd_chflags correspond to FEATURES=chflags so that it can be
used for related conditionals in shell code. (trunk r13342)
svn path=/main/branches/2.1.6/; revision=13499
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild-helpers/prepall | 4 | ||||
-rwxr-xr-x | bin/ebuild.sh | 2 | ||||
-rwxr-xr-x | bin/misc-functions.sh | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall index eec5c814..da37f571 100755 --- a/bin/ebuild-helpers/prepall +++ b/bin/ebuild-helpers/prepall @@ -5,7 +5,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -if type -P chflags > /dev/null && type -P mtree > /dev/null ; then +if hasq chflags $FEATURES ; 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. @@ -18,7 +18,7 @@ prepallinfo prepallstrip -if type -P chflags > /dev/null && type -P mtree > /dev/null; then +if hasq chflags $FEATURES ; 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 diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 8fad20b8..6e5d483e 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -698,7 +698,7 @@ dyn_clean() { elif [ ! -d "${PORTAGE_BUILDDIR}" ] ; then return 0 fi - if type -P chflags > /dev/null ; then + if hasq chflags $FEATURES ; then chflags -R noschg,nouchg,nosappnd,nouappnd "${PORTAGE_BUILDDIR}" chflags -R nosunlnk,nouunlnk "${PORTAGE_BUILDDIR}" 2>/dev/null fi diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 9ffbe0ec..5e7d29b7 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -492,8 +492,7 @@ install_mask() { } preinst_bsdflags() { - type -P chflags > /dev/null || return 0 - type -P mtree > /dev/null || return 1 + hasq chflags $FEATURES || return # Save all the file flags for restoration after installation. mtree -c -p "${D}" -k flags > "${T}/bsdflags.mtree" # Remove all the file flags so that the merge phase can do anything @@ -503,8 +502,7 @@ preinst_bsdflags() { } postinst_bsdflags() { - type -P chflags > /dev/null || return 0 - type -P mtree > /dev/null || return 1 + hasq chflags $FEATURES || return # Restore all the file flags that were saved before installation. mtree -e -p "${ROOT}" -U -k flags < "${T}/bsdflags.mtree" &> /dev/null } |