From e42a69de990e9cc069a5b71b97f0fb4b07e14b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Wed, 27 Jan 2021 20:39:28 -0300 Subject: [PATCH] hooks/post-install: speed up 06-strip-and-debug-pkgs.sh. Files under /usr/share can't be stripped at all, since they shouldn't be ELFs (if they are ELFs, they are unlikely to be ELFs for the target and suitable for being stripped / debugged). Since some big data packages have a lot of files /usr/share, this can considerably speed up the hook, for no change in the package output. --- common/hooks/post-install/06-strip-and-debug-pkgs.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/hooks/post-install/06-strip-and-debug-pkgs.sh b/common/hooks/post-install/06-strip-and-debug-pkgs.sh index b59dde5ab3c..51cfe87df99 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -65,11 +65,7 @@ hook() { STRIPCMD=/usr/bin/$STRIP - find ${PKGDESTDIR} -type f | while read f; do - if [[ $f =~ ^${PKGDESTDIR}/usr/lib/debug/ ]]; then - continue - fi - + find ${PKGDESTDIR} -prune ${PKGDESTDIR}/usr/share/ -prune ${PKGDESTDIR}/usr/lib/debug/ -type f | while read f; do if [[ $(file -b "$f") =~ "no machine" ]]; then continue fi