Whamcloud - gitweb
b=21670 revert new version of find_linux_devel_paths
authorAndrew Perepechko <andrew.perepechko@sun.com>
Fri, 8 Jan 2010 16:25:43 +0000 (11:25 -0500)
committerRobert Read <rread@sun.com>
Tue, 12 Jan 2010 17:31:28 +0000 (09:31 -0800)
i=Andrew Perepechko
o=Brian Murrell

build/lbuild-sles

index 6a76cb0..83fae95 100644 (file)
@@ -86,24 +86,22 @@ rpm_BUILD_kernel_dirname() {
 find_linux_devel_paths() {
     local path="$1"
 
-    LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
+    LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}
 
     local objects=$TARGET_ARCH/$RPMSMPTYPE
-    if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/powerpc ]; then
+    if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/powerpc ]; then
         objects="powerpc/$TARGET_ARCH"
     elif [ $TARGET_ARCH == 'i686' ]; then
         objects="i386/$RPMSMPTYPE"
     fi
 
-    LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$objects
-    LINUXRELEASE=$(find_linux_release "$LINUXOBJ")
+    LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/$objects
 
+    LINUXRELEASE=$(find_linux_release ${LINUXOBJ:-$LINUX})
     if [ -z "$LINUXRELEASE" ]; then
-        echo "Failed to find linux release in $LINUXOBJ"
-        return 255
+        echo "Failed to find linux release in ${LINUXOBJ:-$LINUX}"
+        RC=255
     fi
-
-    return 0
 }
 
 mcpu_rpmbuild_opt() {