* handle inner return value of VM in case of unchanged build correctly
authorAdrian Schröter <adrian@suse.de>
Thu, 5 Feb 2009 20:56:04 +0000 (20:56 +0000)
committerAdrian Schröter <adrian@suse.de>
Thu, 5 Feb 2009 20:56:04 +0000 (20:56 +0000)
build

diff --git a/build b/build
index 7930f5b..1f96421 100755 (executable)
--- a/build
+++ b/build
@@ -1065,13 +1065,22 @@ for SPECFILE in "${SPECFILES[@]}" ; do
            BUILDSTATUS=`dd if="$VM_SWAP" bs=12 count=1 2>/dev/null`
            case $BUILDSTATUS in
              BUILDSTATUS0)
+                # usual successfull build
                mkdir -p $BUILD_ROOT/.build.packages 
                cd $BUILD_ROOT/.build.packages || cleanup_and_exit 1
                echo "build: extracting built packages..."
                dd if=$VM_SWAP bs=512 skip=1 | cpio --extract --no-absolute-filenames -v
                cleanup_and_exit 0
                ;;
-             BUILDSTATUS[1-9])
+             BUILDSTATUS2)
+                # successful, but unchanged build, copy back result anyway
+               mkdir -p $BUILD_ROOT/.build.packages 
+               cd $BUILD_ROOT/.build.packages || cleanup_and_exit 1
+               echo "build: extracting built packages..."
+               dd if=$VM_SWAP bs=512 skip=1 | cpio --extract --no-absolute-filenames -v
+               cleanup_and_exit 2
+               ;;
+             *)
                cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS}
                ;;
            esac