1 |
It's okay to use "keepdir" on /etc/tmpfiles.d. |
2 |
|
3 |
See: https://archives.gentoo.org/gentoo-dev/message/50558b55dc34f37b238807fc4759640d |
4 |
Signed-off-by: Sam James <sam@g.o> |
5 |
--- |
6 |
metadata/install-qa-check.d/60tmpfiles-paths | 7 ++++++- |
7 |
1 file changed, 6 insertions(+), 1 deletion(-) |
8 |
|
9 |
diff --git a/metadata/install-qa-check.d/60tmpfiles-paths b/metadata/install-qa-check.d/60tmpfiles-paths |
10 |
index ed0bdbff8cd5..5ef56885ebe7 100644 |
11 |
--- a/metadata/install-qa-check.d/60tmpfiles-paths |
12 |
+++ b/metadata/install-qa-check.d/60tmpfiles-paths |
13 |
@@ -11,7 +11,12 @@ |
14 |
tmpfiles_check() { |
15 |
# Check 1 |
16 |
# Scan image for files in /etc/tmpfiles.d which is a forbidden location |
17 |
- if [[ -d "${ED}"/etc/tmpfiles.d/ ]] ; then |
18 |
+ # (We use this glob to avoid triggering on keepdir) |
19 |
+ shopt -s nullglob |
20 |
+ local files=( "${ED}"/etc/tmpfiles.d/*.conf ) |
21 |
+ shopt -u nullglob |
22 |
+ |
23 |
+ if [[ ${#files[@]} -gt 0 ]]; then |
24 |
eqawarn "QA Notice: files installed to /etc/tmpfiles.d" |
25 |
eqawarn "tmpfiles configuration files must be installed by ebuilds /usr/lib/tmpfiles.d!" |
26 |
fi |
27 |
-- |
28 |
2.32.0 |