From 98ad47a57f8a2ed71d7a4c023bd72acc677ca0b8 Mon Sep 17 00:00:00 2001 From: johann Date: Wed, 27 May 2009 20:26:00 +0000 Subject: [PATCH] Branch b_release_1_8_1 b=18668 i=yangsheng i=johann (patch from brian) fix sles11 specific build issue. --- build/lbuild | 4 +++- build/lbuild-sles11 | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build/lbuild b/build/lbuild index 9b8d965..d5ef88f 100755 --- a/build/lbuild +++ b/build/lbuild @@ -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 diff --git a/build/lbuild-sles11 b/build/lbuild-sles11 index 995c356..1c68eec 100644 --- a/build/lbuild-sles11 +++ b/build/lbuild-sles11 @@ -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 -- 1.8.3.1