mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 07:48:50 -05:00
makepkg: only remove static libraries if they have a shared version
It is fairly common that packages contain static libraries with no shared counterpart. These should not be removed with !staticlibs. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
5c5b28833c
commit
fe824f87b9
@ -250,7 +250,7 @@ A normal sync or upgrade will not use its value.
|
||||
|
||||
*staticlibs*;;
|
||||
Leave static library (.a) files in packages. Specify `!staticlibs` to
|
||||
remove them.
|
||||
remove them (if they have a shared counterpart).
|
||||
|
||||
*emptydirs*;;
|
||||
Leave empty directories in packages.
|
||||
|
@ -162,7 +162,7 @@ Options
|
||||
|
||||
*staticlibs*;;
|
||||
Leave static library (.a) files in packages. Specify `!staticlibs` to
|
||||
remove them.
|
||||
remove them (if they have a shared counterpart).
|
||||
|
||||
*emptydirs*;;
|
||||
Leave empty directories in packages.
|
||||
|
@ -1584,7 +1584,12 @@ tidy_install() {
|
||||
|
||||
if check_option "staticlibs" "n"; then
|
||||
msg2 "$(gettext "Removing static library files...")"
|
||||
find . ! -type d -name "*.a" -exec rm -f -- '{}' +
|
||||
local l
|
||||
while read -rd '' l; do
|
||||
if [[ -f "${l%.a}.so" ]]; then
|
||||
rm "$l"
|
||||
fi
|
||||
done < <(find . ! -type d -name "*.a" -print0)
|
||||
fi
|
||||
|
||||
if check_option "emptydirs" "n"; then
|
||||
|
Loading…
Reference in New Issue
Block a user