diff options
author | Allan McRae <allan@archlinux.org> | 2010-09-29 21:22:30 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-10-05 10:58:05 -0500 |
commit | 022ec3dbb76686337969cee6e14113b397987cfa (patch) | |
tree | c8e77a6b37215e05dd594c57daf4d543d087134f | |
parent | 821ff061b181d009e0633e5ab12aec7aa608884a (diff) | |
download | pacman-022ec3dbb76686337969cee6e14113b397987cfa.tar.xz |
makepkg: remove STRIP_DIRS
For binary packages, the majority of the time used in the debugs symbol
stripping process is the actual stripping of the binaries/libraries and
not the testing of which files to strip. This allows more complete
stripping of packages that install to "non-standard" paths that would
not be generally included in makepkg.conf.
Any performance hit that may be apparent for (_large_) "arch=('any')"
packages can readily be avoided by disabling stripping in the PKGBUILD
options array.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | doc/makepkg.conf.5.txt | 7 | ||||
-rw-r--r-- | etc/makepkg.conf.in | 4 | ||||
-rw-r--r-- | scripts/makepkg.sh.in | 4 |
3 files changed, 3 insertions, 12 deletions
diff --git a/doc/makepkg.conf.5.txt b/doc/makepkg.conf.5.txt index 753b1792..4700d9c1 100644 --- a/doc/makepkg.conf.5.txt +++ b/doc/makepkg.conf.5.txt @@ -160,13 +160,6 @@ Options that are located in opt/, you may need to add the directory to this array. *NOTE:* Do not add the leading slash to the directory name. -**STRIP_DIRS=(**bin lib sbin usr/{bin,lib} ...**)**:: - If `strip` is specified in the OPTIONS array, this variable will - instruct makepkg where to look to for files to strip. If you build - packages that are located in opt/, you may need to add the directory - to this array. *NOTE:* Do not add the leading slash to the directory - name. - **PURGE_TARGETS=(**usr/{,share}/info/dir .podlist *.pod...**)**:: If `purge` is specified in the OPTIONS array, this variable will instruct makepkg which files to remove from the package. This is diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index f0d1c449..c795432f 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -61,7 +61,7 @@ BUILDENV=(fakeroot !distcc color !ccache) # Default: OPTIONS=(strip docs libtool emptydirs zipman purge) # A negated option will do the opposite of the comments below. # -#-- strip: Strip symbols from binaries/libraries in STRIP_DIRS +#-- strip: Strip symbols from binaries/libraries #-- docs: Save doc directories specified by DOC_DIRS #-- libtool: Leave libtool (.la) files in packages #-- emptydirs: Leave empty directories in packages @@ -82,8 +82,6 @@ STRIP_STATIC="@STRIP_STATIC@" MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info}) #-- Doc directories to remove (if !docs is specified) DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) -#-- Directories to be searched for the strip option (if strip is specified) -STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin}) #-- Files to be removed from all packages (if purge is specified) PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index de243387..ed1380d1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -874,13 +874,13 @@ tidy_install() { done fi - if [[ $(check_option strip) = y && -n ${STRIP_DIRS[*]} ]]; then + if [[ $(check_option strip) = y ]]; then msg2 "$(gettext "Stripping unneeded symbols from binaries and libraries...")" # make sure library stripping variables are defined to prevent excess stripping [[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-S" [[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S" local binary - find ${STRIP_DIRS[@]} -type f -perm -u+w 2>/dev/null | while read binary ; do + find . -type f -perm -u+w 2>/dev/null | while read binary ; do case "$(file -bi "$binary")" in *application/x-sharedlib*) # Libraries (.so) /usr/bin/strip $STRIP_SHARED "$binary";; |