From f3154626a14ce9130b99b945ab98c3841419cac8 Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Thu, 16 Jul 2020 19:44:01 +0200 Subject: [PATCH] 11-pkglint-elf-in-usrshare: allow explicit setting of exceptions --- common/hooks/post-install/11-pkglint-elf-in-usrshare.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ff4f7789e86..41c6af5456d 100644 --- a/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh +++ b/common/hooks/post-install/11-pkglint-elf-in-usrshare.sh @@ -18,7 +18,12 @@ hook() { case "${mime}" in # Note application/x-executable is missing which is present in most Electron apps application/x-sharedlib*|application/x-pie-executable*) - matches+=" ${file#$PKGDESTDIR}" ;; + directory=${file%/*} + if [[ ${ignore_usrshare_files} != *"${file##*/}"* ]] && [[ ${ignore_usrshare_dirs} != *"${directory##*/}"* ]] + then + matches+=" ${file#$PKGDESTDIR}" + fi + ;; esac done < <(find $PKGDESTDIR/usr/share -type f | file --mime-type --files-from -)