[pacman-dev] [PATCH] makepkg: refix removing static libraries when shared uses absolute symlinks

Allan McRae allan at archlinux.org
Tue Jan 27 01:50:48 UTC 2015


Commit 9e5e86aa was supposed to fix this.  Instead I picked another [[ -f ]]
statement in the same region and added the hardlink test to it instead, thus
not fixing the bug.

Signed-off-by: Allan McRae <allan at archlinux.org>
---

:facepalm:

 scripts/makepkg.sh.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 99f645b..40913c5 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1819,7 +1819,7 @@ tidy_install() {
 		msg2 "$(gettext "Removing static library files...")"
 		local l
 		while read -rd '' l; do
-			if [[ -f "${l%.a}.so" ]]; then
+			if [[ -f "${l%.a}.so" || -h "${l%.a}.so" ]]; then
 				rm "$l"
 			fi
 		done < <(find . ! -type d -name "*.a" -print0)
@@ -1833,7 +1833,7 @@ tidy_install() {
 	# check existence of backup files
 	local file
 	for file in "${backup[@]}"; do
-		if [[ ! -f $file && ! -h $file ]]; then
+		if [[ ! -f $file ]]; then
 			warning "$(gettext "%s entry file not in package : %s")" "backup" "$file"
 		fi
 	done
-- 
2.2.2


More information about the pacman-dev mailing list