Whamcloud - gitweb
Branch b1_8
authoryangsheng <yangsheng>
Mon, 1 Jun 2009 11:21:19 +0000 (11:21 +0000)
committeryangsheng <yangsheng>
Mon, 1 Jun 2009 11:21:19 +0000 (11:21 +0000)
b=18668

i=yangsheng, johann

Fixed the patchless build issue specific sles11.
Author: brian

build/lbuild
build/lbuild-sles11

index 9b8d965..d5ef88f 100755 (executable)
@@ -803,6 +803,8 @@ find_linux_release() {
 
 }
 
+# XXX this needs to be re-written as a wrapper around find_rpm
+#     or just gotten rid of.  :-)
 find_linux_rpm() {
     local prefix="$1"
     local delimiter=${2:-"-"}
@@ -855,7 +857,7 @@ unpack_linux_devel_rpm() {
 
     # call a distro specific hook, if available
     if type -p unpack_linux_devel_rpm-$DISTRO; then
-        unpack_linux_devel_rpm-$DISTRO
+        unpack_linux_devel_rpm-$DISTRO "$kernelrpm"
     fi
 
     popd
index 995c356..1c68eec 100644 (file)
@@ -50,12 +50,18 @@ curl ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17
 }
 
 unpack_linux_devel_rpm-sles11() {
+    local callers_rpm="$1"
+
+    local rpmdir="${callers_rpm%/*}"
+
     local kernelrpm
-    if ! kernelrpm=$(find_rpm "$TOPDIR/RPMS/$arch/" provides "^kernel-lustre-default-base ="); then
-        fatal 1 "Could not find the kernel-lustre-default-base in $TOPDIR/RPMS/$arch/"
+    # this is a hack that should go away when the modified lustre kernel
+    # Provides kernel-default-base                        vvvvvvvvv
+    if ! kernelrpm=$(find_rpm "$rpmdir" provides "^kernel-(lustre-)?default-base ="); then
+        fatal 1 "Could not find the kernel-default-base in $rpmdir/"
     fi
 
-    if ! rpm2cpio < "$TOPDIR/RPMS/$arch/$kernelrpm" | cpio -id > /dev/null 2>&1; then
+    if ! rpm2cpio < "$rpmdir/$kernelrpm" | cpio -id > /dev/null 2>&1; then
         fatal 1 "Unpack error for $kernelrpm"
     fi