Add debugging code to show ARCH when running callback
authorAndrew Gaffney <agaffney@gentoo.org>
Thu, 13 Mar 2008 04:40:37 +0000 (04:40 +0000)
committerAndrew Gaffney <agaffney@gentoo.org>
Thu, 13 Mar 2008 04:40:37 +0000 (04:40 +0000)
Unset ARCH when running callback and restore afterwards

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@635 67a159dc-881f-0410-a524-ba9dfbe2cb84

ChangeLog
genkernel

index f3c4c14bc9ed2b84eb0273862acb624e9ec28dd9..fbf372d69a93f6641fa03025265385adbaa81f05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 # Copyright 2006-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  13 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> genkernel:
+  Add debugging code to show ARCH when running callback
+  Unset ARCH when running callback and restore afterwards
+
   13 Mar 2008; Andrew Gaffney <agaffney@gentoo.org> genkernel:
   Move set_kernel_arch() call to after determine_real_args() so that get_KV()
   has populated the vars we need
index 30608b53fb25c88e16f5a48961e79a670da8a5a5..552205b7318173a690e6860e54d26ff4f6e9652d 100755 (executable)
--- a/genkernel
+++ b/genkernel
@@ -280,11 +280,15 @@ then
        if [ "${CALLBACK_ESCAPE}" -eq '0' ]
        then
                echo
+               echo "DEBUG: callback: ARCH=${ARCH}"
+               ORIG_ARCH=${ARCH}
+               unset ARCH
                echo
                eval ${CMD_CALLBACK} | tee -a ${LOGFILE}
                CMD_STATUS="${PIPESTATUS[0]}"
                echo
                print_info 1 "<<< Callback exit status: ${CMD_STATUS}"
+               export ARCH=${ORIG_ARCH}
                [ "${CMD_STATUS}" -ne 0 ] && gen_die '--callback failed!'
        else
                echo