Also, skip preinst_mask phase when INSTALL_MASK is empty. --- bin/misc-functions.sh | 8 -------- bin/phase-functions.sh | 12 +++++++++++- 2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 7643af7b5..742ce40d2 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -375,14 +375,6 @@ preinst_mask() { # in there in case any tools were built with -pg in CFLAGS. cd "${T}" - # remove man pages, info pages, docs if requested - local f - for f in man info doc; do - if has no${f} $FEATURES; then - INSTALL_MASK="${INSTALL_MASK} /usr/share/${f}" - fi - done - install_mask "${ED}" "${INSTALL_MASK}" # remove share dir if unnessesary diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 3aae3ef56..bdae68f79 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -660,13 +660,23 @@ __dyn_install() { cd "${PORTAGE_BUILDDIR}"/build-info set -f local f x + + # remove man pages, info pages, docs if requested + for f in man info doc; do + if has no${f} ${FEATURES} && \ + ! has "/usr/share/${f}" ${INSTALL_MASK}; then + INSTALL_MASK+=" /usr/share/${f}" + fi + done + IFS=$' \t\n\r' for f in CATEGORY DEFINED_PHASES FEATURES INHERITED IUSE \ PF PKGUSE SLOT KEYWORDS HOMEPAGE DESCRIPTION \ ASFLAGS CBUILD CC CFLAGS CHOST CTARGET CXX \ CXXFLAGS EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \ LDFLAGS LIBCFLAGS LIBCXXFLAGS QA_CONFIGURE_OPTIONS \ - QA_DESKTOP_FILE QA_PREBUILT PROVIDES_EXCLUDE REQUIRES_EXCLUDE ; do + QA_DESKTOP_FILE QA_PREBUILT PROVIDES_EXCLUDE REQUIRES_EXCLUDE \ + INSTALL_MASK PKG_INSTALL_MASK; do x=$(echo -n ${!f}) [[ -n $x ]] && echo "$x" > $f -- 2.13.6