diff options
author | Zac Medico <zmedico@gentoo.org> | 2019-04-27 11:11:11 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2019-04-29 19:40:10 -0700 |
commit | bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662 (patch) | |
tree | 949ca4da115c3bb0c9fee08f763bce62a666d2a6 | |
parent | fetch: atomic downloads (bug 175612) (diff) | |
download | gentoo-portage-bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662.tar.xz gentoo-portage-bfda0d2bd4ba03a4e77f488ec3fd4f9c6c351662.zip |
Enable FEATURES=strict-keepdir behavior for new EAPIs
Suggested-by: Pacho Ramos <pacho@gentoo.org>
Bug: https://bugs.gentoo.org/651678
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r-- | bin/eapi.sh | 4 | ||||
-rw-r--r-- | bin/install-qa-check.d/95empty-dirs | 4 | ||||
-rw-r--r-- | man/make.conf.5 | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/bin/eapi.sh b/bin/eapi.sh index 455bc9b0d..4eafc1c87 100644 --- a/bin/eapi.sh +++ b/bin/eapi.sh @@ -247,3 +247,7 @@ ___eapi_bash_4_2() { ___eapi_has_ENV_UNSET() { [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]] } + +___eapi_has_strict_keepdir() { + [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|5|5-progress|6|7)$ ]] +} diff --git a/bin/install-qa-check.d/95empty-dirs b/bin/install-qa-check.d/95empty-dirs index 8599db395..34a1daf21 100644 --- a/bin/install-qa-check.d/95empty-dirs +++ b/bin/install-qa-check.d/95empty-dirs @@ -17,7 +17,9 @@ find_empty_dirs() { local warn_dirs=() local d striparg= - [[ ${FEATURES} == *strict-keepdir* ]] && striparg=-delete + if ___eapi_has_strict_keepdir || [[ ${FEATURES} == *strict-keepdir* ]]; then + striparg=-delete + fi while IFS= read -r -d $'\0' d; do [[ ${d} == ${ED%/}/var/* ]] && warn_dirs+=( "${d}" ) diff --git a/man/make.conf.5 b/man/make.conf.5 index 0ad3e2f7d..4c9f00675 100644 --- a/man/make.conf.5 +++ b/man/make.conf.5 @@ -649,6 +649,7 @@ dangerous (like missing or incorrect digests for ebuilds). .B strict-keepdir Have portage strictly require keepdir calls in ebuilds. Empty directories installed without explicit keepdir will be removed. +This feature is automatically enabled for \fBEAPI 8\fR and later. .TP .B stricter Have portage react strongly to conditions that may conflict with system |