Whamcloud - gitweb
b=20744 set arch correctly for ofed-devel
authorBrian J. Murrell <brian.murrell@oracle.com>
Tue, 19 Oct 2010 02:01:35 +0000 (22:01 -0400)
committerVitaly Fertman <vitaly.fertman@sun.com>
Thu, 21 Oct 2010 23:33:00 +0000 (03:33 +0400)
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
i=yibin.wang

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

index 9177661..dfc6f1c 100755 (executable)
@@ -1177,7 +1177,6 @@ reuse() {
                 find $dir -type f |
                   xargs ln -t $dest/RPMS/${dir##*/} -s
             done
-
         fi
         return 0
     else
@@ -1506,14 +1505,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 6330d1c..aece52b 100644 (file)
@@ -227,11 +227,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