Adding robbat2's patch for bug #62365.

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@133 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Tim Yamin 21 years ago
parent 285047a600
commit 60b52a3392

@ -120,28 +120,38 @@ compile_generic() {
export_utils_args export_utils_args
MAKE=${UTILS_MAKE} MAKE=${UTILS_MAKE}
fi fi
case "$2" in
kernel) ARGS="`compile_kernel_args`" ;;
utils) ARGS="`compile_utils_args`" ;;
*) ARGS="" ;; # includes runtask
esac
# the eval usage is needed in the next set of code
# as ARGS can contain spaces and quotes, eg:
# ARGS='CC="ccache gcc"'
if [ "${2}" == 'runtask' ] if [ "${2}" == 'runtask' ]
then then
print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${1}" 1 0 1 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${1}" 1 0 1
${MAKE} -s ${MAKEOPTS/-j?/-j1} ${1} eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${1}
RET=$? RET=$?
elif [ "${DEBUGLEVEL}" -gt "1" ] elif [ "${DEBUGLEVEL}" -gt "1" ]
then then
# Output to stdout and debugfile # Output to stdout and debugfile
print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${1}" 1 0 1 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
${MAKE} ${MAKEOPTS} ${1} 2>&1 | tee -a ${DEBUGFILE} eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} 2>&1 | tee -a ${DEBUGFILE}
RET=$? RET=${PIPESTATUS[0]}
else else
# Output to debugfile only # Output to debugfile only
print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${1}" 1 0 1 print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS} ${ARGS} ${1}" 1 0 1
${MAKE} ${MAKEOPTS} ${1} >> ${DEBUGFILE} 2>&1 eval ${MAKE} ${MAKEOPTS} ${ARGS} ${1} >> ${DEBUGFILE} 2>&1
RET=$? RET=$?
fi fi
[ "${RET}" -ne '0' ] && [ "${RET}" -ne '0' ] &&
gen_die "Failed to compile the \"${1}\" target..." gen_die "Failed to compile the \"${1}\" target..."
unset MAKE unset MAKE
unset ARGS
if [ "${2}" = 'kernel' ] if [ "${2}" = 'kernel' ]
then then
unset_kernel_args unset_kernel_args

@ -225,7 +225,7 @@ gen_die() {
has_loop() { has_loop() {
dmesg | egrep -q '^loop:' dmesg | egrep -q '^loop:'
if [ -e '/dev/loop0' -o -e '/dev/loop/0' -a $? ] if [ -e '/dev/loop0' -o -e '/dev/loop/0' -a ${PIPESTATUS[1]} ]
then then
# We found devfs or standard dev loop device, assume # We found devfs or standard dev loop device, assume
# loop is compiled into the kernel or the module is loaded # loop is compiled into the kernel or the module is loaded

@ -183,7 +183,7 @@ then
echo echo
eval ${CMD_CALLBACK} | tee -a ${DEBUGFILE} eval ${CMD_CALLBACK} | tee -a ${DEBUGFILE}
echo echo
print_info 1 "<<< Callback exit status: $?" print_info 1 "<<< Callback exit status: ${PIPESTATUS[0]}"
else else
echo echo
print_info 1 ">>> Callback cancelled..." print_info 1 ">>> Callback cancelled..."

Loading…
Cancel
Save