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