[pacman-dev] [PATCH] makepkg: fix log file names for arch=any packages

Florian Pritz bluewind at xinu.at
Tue Jun 19 17:56:07 EDT 2012


Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
 scripts/makepkg.sh.in |   21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 718b4e9..9a41417 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -151,18 +151,23 @@ clean_up() {
 		rm -rf "$pkgdir" "$srcdir"
 		if [[ -n $pkgbase ]]; then
 			local fullver=$(get_full_version)
+			local logarch=$CARCH
+			if [[ $arch = "any" ]]; then
+				logarch="any"
+			fi
+
 			# Can't do this unless the BUILDSCRIPT has been sourced.
 			if (( BUILDFUNC )); then
-				rm -f "${pkgbase}-${fullver}-${CARCH}-build.log"*
+				rm -f "${pkgbase}-${fullver}-${logarch}-build.log"*
 			fi
 			if (( CHECKFUNC )); then
-				rm -f "${pkgbase}-${fullver}-${CARCH}-check.log"*
+				rm -f "${pkgbase}-${fullver}-${logarch}-check.log"*
 			fi
 			if (( PKGFUNC )); then
-				rm -f "${pkgbase}-${fullver}-${CARCH}-package.log"*
+				rm -f "${pkgbase}-${fullver}-${logarch}-package.log"*
 			elif (( SPLITPKG )); then
 				for pkg in ${pkgname[@]}; do
-					rm -f "${pkgbase}-${fullver}-${CARCH}-package_${pkg}.log"*
+					rm -f "${pkgbase}-${fullver}-${logarch}-package_${pkg}.log"*
 				done
 			fi
 
@@ -974,7 +979,13 @@ run_function() {
 	local ret=0
 	if (( LOGGING )); then
 		local fullver=$(get_full_version)
-		local BUILDLOG="${startdir}/${pkgbase}-${fullver}-${CARCH}-$pkgfunc.log"
+
+		local logarch=$CARCH
+		if [[ $arch = "any" ]]; then
+			logarch="any"
+		fi
+
+		local BUILDLOG="${startdir}/${pkgbase}-${fullver}-${logarch}-$pkgfunc.log"
 		if [[ -f $BUILDLOG ]]; then
 			local i=1
 			while true; do
-- 
1.7.10.4


More information about the pacman-dev mailing list