1 |
Suggested-by: Pacho Ramos <pacho@g.o> |
2 |
Bug: https://bugs.gentoo.org/651678 |
3 |
Signed-off-by: Zac Medico <zmedico@g.o> |
4 |
--- |
5 |
bin/eapi.sh | 4 ++++ |
6 |
bin/install-qa-check.d/95empty-dirs | 4 +++- |
7 |
man/make.conf.5 | 1 + |
8 |
3 files changed, 8 insertions(+), 1 deletion(-) |
9 |
|
10 |
diff --git a/bin/eapi.sh b/bin/eapi.sh |
11 |
index 455bc9b0d..4eafc1c87 100644 |
12 |
--- a/bin/eapi.sh |
13 |
+++ b/bin/eapi.sh |
14 |
@@ -247,3 +247,7 @@ ___eapi_bash_4_2() { |
15 |
___eapi_has_ENV_UNSET() { |
16 |
[[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|4-slot-abi|5|5-progress|6)$ ]] |
17 |
} |
18 |
+ |
19 |
+___eapi_has_strict_keepdir() { |
20 |
+ [[ ! ${1-${EAPI-0}} =~ ^(0|1|2|3|4|4-python|5|5-progress|6|7)$ ]] |
21 |
+} |
22 |
diff --git a/bin/install-qa-check.d/95empty-dirs b/bin/install-qa-check.d/95empty-dirs |
23 |
index 8599db395..34a1daf21 100644 |
24 |
--- a/bin/install-qa-check.d/95empty-dirs |
25 |
+++ b/bin/install-qa-check.d/95empty-dirs |
26 |
@@ -17,7 +17,9 @@ find_empty_dirs() { |
27 |
local warn_dirs=() |
28 |
local d striparg= |
29 |
|
30 |
- [[ ${FEATURES} == *strict-keepdir* ]] && striparg=-delete |
31 |
+ if ___eapi_has_strict_keepdir || [[ ${FEATURES} == *strict-keepdir* ]]; then |
32 |
+ striparg=-delete |
33 |
+ fi |
34 |
|
35 |
while IFS= read -r -d $'\0' d; do |
36 |
[[ ${d} == ${ED%/}/var/* ]] && warn_dirs+=( "${d}" ) |
37 |
diff --git a/man/make.conf.5 b/man/make.conf.5 |
38 |
index 0ad3e2f7d..4c9f00675 100644 |
39 |
--- a/man/make.conf.5 |
40 |
+++ b/man/make.conf.5 |
41 |
@@ -649,6 +649,7 @@ dangerous (like missing or incorrect digests for ebuilds). |
42 |
.B strict-keepdir |
43 |
Have portage strictly require keepdir calls in ebuilds. Empty |
44 |
directories installed without explicit keepdir will be removed. |
45 |
+This feature is automatically enabled for \fBEAPI 8\fR and later. |
46 |
.TP |
47 |
.B stricter |
48 |
Have portage react strongly to conditions that may conflict with system |
49 |
-- |
50 |
2.21.0 |