1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-21 23:38:49 -05:00

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>
This commit is contained in:
Allan McRae 2010-09-29 21:22:30 +10:00 committed by Dan McGee
parent 821ff061b1
commit 022ec3dbb7
3 changed files with 3 additions and 12 deletions

View File

@ -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

View File

@ -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)

View File

@ -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";;