diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-03-22 22:49:29 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-09-17 08:45:13 +0200 |
commit | 2f1c3a0e7e0e5b6d61ede0c5328ea8010881f9b5 (patch) | |
tree | 8e83b1bf40c5c64724bdd508bae82bbfaa9bb051 | |
parent | Ban prepalldocs in ebuild scope (diff) | |
download | portage-2f1c3a0e7e0e5b6d61ede0c5328ea8010881f9b5.tar.gz portage-2f1c3a0e7e0e5b6d61ede0c5328ea8010881f9b5.tar.bz2 portage-2f1c3a0e7e0e5b6d61ede0c5328ea8010881f9b5.zip |
Ban prepall in ebuild scope
Reviewed-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-x | bin/ebuild-helpers/prepall | 28 | ||||
-rwxr-xr-x | bin/misc-functions.sh | 27 |
2 files changed, 28 insertions, 27 deletions
diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall index 87e1ca20c..e23a6d410 100755 --- a/bin/ebuild-helpers/prepall +++ b/bin/ebuild-helpers/prepall @@ -4,29 +4,5 @@ source "${PORTAGE_BIN_PATH}"/isolated-functions.sh || exit 1 -if ! ___eapi_has_prefix_variables; then - ED=${D} -fi - -if has chflags $FEATURES ; then - # Save all the file flags for restoration at the end of prepall. - mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" - # Remove all the file flags so that prepall can do anything necessary. - chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" - chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null -fi - -if ! ___eapi_has_docompress; then - while IFS= read -r -d '' mandir ; do - mandir=${mandir#${ED}} - prepman "${mandir%/man}" - done < <(find "${ED}" -type d -name man -print0) -fi -[[ -d ${ED%/}/usr/share/info ]] && prepinfo - -___eapi_has_dostrip || prepallstrip - -if has chflags $FEATURES ; then - # Restore all the file flags that were saved at the beginning of prepall. - mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null -fi +die "'${0##*/}' is not allowed in ebuild scope" +exit 1 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 34492e086..d25bc8498 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -162,6 +162,31 @@ prepcompress() { return 0 } +__prepall() { + if has chflags $FEATURES ; then + # Save all the file flags for restoration at the end of prepall. + mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" + # Remove all the file flags so that prepall can do anything necessary. + chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" + chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null + fi + + if ! ___eapi_has_docompress; then + while IFS= read -r -d '' mandir ; do + mandir=${mandir#${ED}} + prepman "${mandir%/man}" + done < <(find "${ED}" -type d -name man -print0) + fi + [[ -d ${ED%/}/usr/share/info ]] && prepinfo + + ___eapi_has_dostrip || prepallstrip + + if has chflags $FEATURES ; then + # Restore all the file flags that were saved at the beginning of prepall. + mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null + fi +} + install_qa_check() { local d f i qa_var x paths qa_checks=() checks_run=() if ! ___eapi_has_prefix_variables; then @@ -219,7 +244,7 @@ install_qa_check() { done < <(printf "%s\0" "${qa_checks[@]}" | LC_ALL=C sort -u -z) export STRIP_MASK - prepall + __prepall ___eapi_has_docompress && prepcompress ecompressdir --dequeue ecompress --dequeue |