aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-03-20 03:26:26 -0400
committerB. Watson <urchlay@slackware.uk>2023-03-20 03:26:26 -0400
commitdc2614d8c174c528b043264246bedb29fc1408bd (patch)
tree27c2a7a4d495c872ddd4d0e86f26ecedad7370f7
parent76ce2b889d74d6b5586d465b65598d98d4b42412 (diff)
downloadsbo-maintainer-tools-dc2614d8c174c528b043264246bedb29fc1408bd.tar.gz
sbopkglint: add empty dir test (non-fatal).
-rw-r--r--sbopkglint.d/05-basic-sanity.t.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbopkglint.d/05-basic-sanity.t.sh b/sbopkglint.d/05-basic-sanity.t.sh
index 984b285..cfdf9cd 100644
--- a/sbopkglint.d/05-basic-sanity.t.sh
+++ b/sbopkglint.d/05-basic-sanity.t.sh
@@ -162,3 +162,8 @@ brokenlinks="$( find -L . -type l \! -lname '/*' )"
[ -n "$brokenabslinks" ] && warn "package contains broken absolute symlinks:" && ls -ld $brokenabslinks
[ -n "$brokenlinks" ] && warn "package contains broken relative symlinks:" && ls -ld $brokenlinks
+
+# 20230320 bkw: empty directories. this isn't an error, just a note, and
+# we ignore any empty dirs under /var because lots of packages need these.
+emptydirs="$( find . -type d -a -empty | grep -v 'var\>' )"
+[ -n "$emptydirs" ] && note "package contains empty dirs, are these necessary?" && ls -ld $emptydirs