Whamcloud - gitweb
b=23428 Fix lustre built with --enable-lu_ref
[fs/lustre-release.git] / build / lbuild-sles
index 94af57a..ad774d9 100644 (file)
@@ -86,22 +86,24 @@ rpm_BUILD_kernel_dirname() {
 find_linux_devel_paths() {
     local path="$1"
 
-    LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}
+    LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
 
     local objects=$TARGET_ARCH/$RPMSMPTYPE
-    if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/powerpc ]; then
+    if [ -d $path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/powerpc ]; then
         objects="powerpc/$TARGET_ARCH"
     elif [ $TARGET_ARCH == 'i686' ]; then
         objects="i386/$RPMSMPTYPE"
     fi
 
-    LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}-obj/$objects
+    LINUXOBJ=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$objects
+    LINUXRELEASE=$(find_linux_release "$LINUXOBJ")
 
-    LINUXRELEASE=$(find_linux_release ${LINUXOBJ:-$LINUX})
     if [ -z "$LINUXRELEASE" ]; then
-        echo "Failed to find linux release in ${LINUXOBJ:-$LINUX}"
+        echo "Failed to find linux release in $LINUXOBJ"
         return 255
     fi
+
+    return 0
 }
 
 mcpu_rpmbuild_opt() {
@@ -109,4 +111,3 @@ mcpu_rpmbuild_opt() {
     echo "--define \'jobs $(/usr/bin/getconf _NPROCESSORS_ONLN)\'"
     return 0
 }
-