From 695d606224bc3dae5a2aa96581d1af49310822b2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 17 Jun 2023 04:43:29 -0400 Subject: sbopkglint: spaces in filenames WIP #9. --- sbopkglint.d/15-noarch.t.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sbopkglint.d/15-noarch.t.sh') 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.$$ -- cgit v1.2.3