Whamcloud - gitweb
b=20744 set arch correctly for ofed-devel
authorBrian J. Murrell <brian.murrell@oracle.com>
Tue, 12 Oct 2010 19:56:32 +0000 (15:56 -0400)
committerJohann Lombardi <johann.lombardi@oracle.com>
Wed, 13 Oct 2010 09:28:05 +0000 (11:28 +0200)
Oh boy, more fallout from our not building i586 kernels for sles.
If we are building lustre servers and NOT rebuilding the Suse ofed
RPM, then we need to look for the i586 ofed-devel package.

i=yangsheng

build/lbuild
build/lbuild-sles
build/lbuild-sles10

index b742afb..ddc8e3e 100755 (executable)
@@ -1208,7 +1208,6 @@ reuse() {
                 find $dir -type f |
                   xargs ln -t $dest/RPMS/${dir##*/} -s
             done
-
         fi
         return 0
     else
@@ -1671,14 +1670,14 @@ EOF
         local dir
         for dir in RPMS/*; do
             pushd $dir
-                for file in *; do
-                    if [ -h $file ]; then
-                        cp $file foo
-                        mv foo $file
-                    fi
-                done
+            for file in $(ls); do
+                if [ -h $file ]; then
+                    cp $file foo
+                    mv foo $file
+                fi
             done
-        popd
+            popd
+        done
         # also, for i?86, make sure all of the RPMs are in RPMS/$TARGET_ARCH
         # as that's where LTS expects to find them
         for dir in RPMS/*; do
index 6d886c6..8037bca 100644 (file)
@@ -97,7 +97,7 @@ resolve_arch() {
                 ;;
         i?86)  if $canonical; then
                     arch=i386
-                elif $for_patchless; then
+                elif $(eval $for_patchless); then
                     arch=i586
                 fi
                 ;;
index 28bbcf4..f6e34c0 100644 (file)
@@ -229,11 +229,11 @@ build_ofed-sles10() {
     # temporary hack until we get a base O/S intalled ofed-devel
     local arch=$TARGET_ARCH
     if [ -n "$OFED_VERSION" -a "$OFED_VERSION" = "inkernel" ]; then
-        local ofed_devel="${OFED_DEVEL_LOCATION}/ofed-devel-${OFED_DEVEL_VERSION}.$(resolve_arch $TARGET_ARCH $PATCHLESS).rpm"
+        local ofed_devel="${OFED_DEVEL_LOCATION}/ofed-devel-${OFED_DEVEL_VERSION}.$(resolve_arch $TARGET_ARCH "$PATCHLESS || ! $REBUILD_OFED_DEVEL_RPM").rpm"
         if ! rpm2cpio < $ofed_devel | cpio -id; then
             fatal 1 "could not unpack the ofed-devel rpm."
        fi
-        echo "$(pwd)/usr/src/kernel-modules-ofed/$(resolve_arch $TARGET_ARCH $PATCHLESS)/$RPMSMPTYPE"
+        echo "$(pwd)/usr/src/kernel-modules-ofed/$(resolve_arch $TARGET_ARCH "$PATCHLESS || ! $REBUILD_OFED_DEVEL_RPM")/$RPMSMPTYPE"
     fi
 
     return 0