From 772e938938e92e7395bcfd9f3c7e4d0e8a751c82 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 7 Mar 2014 09:49:41 +0100 Subject: [PATCH] hooks/post-install/06-prepare-32bit.sh: return early if destdir32 does not exist; only for x86. --- common/hooks/post-install/06-prepare-32bit.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/hooks/post-install/06-prepare-32bit.sh b/common/hooks/post-install/06-prepare-32bit.sh index 7dac08d2497..674a6e66e04 100644 --- a/common/hooks/post-install/06-prepare-32bit.sh +++ b/common/hooks/post-install/06-prepare-32bit.sh @@ -12,7 +12,7 @@ hook() { return fi # This hook will only work when building for x86. - if [ "$XBPS_MACHINE" != "i686" ]; then + if [ "$XBPS_TARGET_MACHINE" != "i686" ]; then return fi # Ignore noarch pkgs. @@ -43,6 +43,10 @@ hook() { rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null done + if [ ! -d ${destdir32} ]; then + return + fi + # Switch pkg-config files to lib32. if [ -d ${destdir32}/usr/lib32/pkgconfig ]; then sed -e 's,/usr/lib,/usr/lib32,g' \