aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbopkglint.d/15-noarch.t.sh10
-rw-r--r--sbopkglint.d/pre-doinst.sh2
2 files changed, 7 insertions, 5 deletions
diff --git a/sbopkglint.d/15-noarch.t.sh b/sbopkglint.d/15-noarch.t.sh
index 7480ba8..1d4c0fc 100644
--- a/sbopkglint.d/15-noarch.t.sh
+++ b/sbopkglint.d/15-noarch.t.sh
@@ -10,13 +10,15 @@
# for packages that aren't noarch, recommend noarch if it looks like one.
# the recommendation is not an error!
-elfbins="$( find * -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 )"
+find . -type f -print0 | xargs -0 file -m /etc/file/magic/elf | grep ELF | cut -d: -f1 | xargs -d "\n" ls -lb > .elfbins.$$
if [ "$ARCH" = "noarch" ]; then
- [ -n "$elfbins" ] && \
+ [ -s .elfbins.$$ ] && \
warn "package claims to be noarch, but contains ELF binaries:" && \
- ls -l $elfbins
-elif [ -z "$elfbins" ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then
+ cat .elfbins.$$
+elif [ ! -s .elfbins.$$ ] && [ ! -e usr/lib ] && [ ! -e usr/lib64 ]; then
x="$( find usr/share/pkgconfig -type f -exec grep 'usr/lib' {} \+ 2>/dev/null )"
[ -z "$x" ] && note "package might be a good candidate for noarch"
fi
+
+rm -f .elfbins.$$
diff --git a/sbopkglint.d/pre-doinst.sh b/sbopkglint.d/pre-doinst.sh
index 5beb6a2..24a5815 100644
--- a/sbopkglint.d/pre-doinst.sh
+++ b/sbopkglint.d/pre-doinst.sh
@@ -35,6 +35,6 @@ if [ -d usr/share/fonts ]; then
fi
find_warnfiles "package contains actual symlinks:" \
- find -P . -type l
+ -P . -type l
[ -f install/slack-desc ] || warn "required file install/slack-desc is missing"