From d36120c73dde2482fadd50ff14342266b644fbd3 Mon Sep 17 00:00:00 2001 From: Duncaen Date: Sat, 3 Sep 2022 15:30:51 +0200 Subject: [PATCH] 11-pkglint-elf-in-usrshare: use file --no-pad so we don't have to strip it --- common/hooks/post-install/11-pkglint-elf-in-usrshare.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh b/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh index a665f3ed94d..729f5203b89 100644 --- a/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh +++ b/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh @@ -24,8 +24,7 @@ hook() { # Find all binaries in /usr/share and add them to the pool while read -r f; do - mime="${f##*:}" - mime="${mime// /}" + mime="${f##*: }" file="${f%:*}" file="${file#${PKGDESTDIR}}" case "${mime}" in @@ -37,7 +36,7 @@ hook() { fi ;; esac - done < <(find $PKGDESTDIR/usr/share $prune_expr -type f | file --mime-type --files-from -) + done < <(find $PKGDESTDIR/usr/share $prune_expr -type f | file --no-pad --mime-type --files-from -) # Check passed if no packages in pool if [ -z "$matches" ]; then