From 6d1e1e62231a6f6dafa19fbc1e81f2f3a39b95b7 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 52591c38b31..1c03c5b8130 100644 --- a/common/hooks/post-install/06-strip-and-debug-pkgs.sh +++ b/common/hooks/post-install/06-strip-and-debug-pkgs.sh @@ -65,10 +65,10 @@ hook() { STRIPCMD=/usr/bin/$STRIP - find ${PKGDESTDIR} -type f | while read f; do - if [[ $f =~ ^${PKGDESTDIR}/usr/lib/debug/ ]]; then - continue - fi + find ${PKGDESTDIR} \ + \( -path ${PKGDESTDIR}/usr/share -o -path ${PKGDESTDIR}/usr/lib/debug \) -prune \ + -false -o -type f | + while read f; do fname=${f##*/} for x in ${nostrip_files}; do