Added modified version of patch from gentoo bug #238707
authorAndrew Gaffney <agaffney@gentoo.org>
Sat, 15 Nov 2008 16:00:04 +0000 (10:00 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Sat, 15 Nov 2008 16:00:04 +0000 (10:00 -0600)
ChangeLog
gen_determineargs.sh

index ac7072d1c4c4021573bce268c768539f1b0e93e7..792716895f5672f09614827121272e85f71ad8da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
 # Distributed under the GPL v2
 
+  15 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> gen_determineargs.sh:
+  Added modified version of patch from gentoo bug #238707
+
   14 Nov 2008; Andrew Gaffney <agaffney@gentoo.org> gen_initramfs.sh:
   Only append unionfs_fuse stuff if UNIONFS is set
 
index 85b137bb28fae250adc382ee558c92bb34035698..0fd2e7d13f3b6672c32b5ce6a2b8874976220a1e 100644 (file)
@@ -23,6 +23,15 @@ get_KV() {
                PAT=`grep ^PATCHLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'`
                SUB=`grep ^SUBLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'`
                EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'`
+
+               if [ -z "${SUB}" ]; 
+               then
+                       # Handle O= build directories
+                       KERNEL_SOURCE_DIR=`grep ^MAKEARGS\ \:\=  ${KERNEL_DIR}/Makefile | awk '{ print $4 };'`
+                       SUB=`grep ^SUBLEVEL\ \= ${KERNEL_SOURCE_DIR}/Makefile | awk '{ print $3 };'`
+                       EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_SOURCE_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'`
+               fi
+
                cd ${KERNEL_DIR}
                #compile_generic prepare kernel > /dev/null 2>&1
                cd - > /dev/null 2>&1