Feature : create new 'rpmbuildstage:' option on OBS.
authorYonghee Han <onstudy@samsung.com>
Mon, 3 Apr 2017 04:50:12 +0000 (13:50 +0900)
committerSoonKyu Park <sk7.park@samsung.com>
Tue, 4 Apr 2017 11:40:54 +0000 (20:40 +0900)
        Use : add 'rpmbuildstage: bb' option at the OBS Project config.
        Modify : build -> send BUILD_RPM_BUILD_STAGE option to VM build.data
                 build.pm -> precheck the rpmbuildstage: option.
        Related package: bs_worker of the obs-server package.

Change-Id: I0c7199f0f9eeda835755e854e764eb871d558b6e

Conflicts:
build-vm

build-vm

index 01070d984c98adc55a8cfd4a91c8b342822efda6..e88721ceedeb6d1ced03074696dc29e34e8f2fdc 100644 (file)
--- a/build-vm
+++ b/build-vm
@@ -686,6 +686,14 @@ vm_first_stage() {
     echo "BUILDENGINE='$BUILDENGINE'" >> $BUILD_ROOT/.build/build.data
     echo "CCACHE='$CCACHE'" >> $BUILD_ROOT/.build/build.data
     echo "ABUILD_TARGET='$ABUILD_TARGET'" >> $BUILD_ROOT/.build/build.data
+    # use the rpmbuild --stage option
+    if [ ! -z $BUILD_RPM_BUILD_STAGE ]; then
+        if [[ "$BUILD_RPM_BUILD_STAGE" =~ ^- ]]; then
+            echo "BUILD_RPM_BUILD_STAGE='$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data
+        else
+            echo "BUILD_RPM_BUILD_STAGE='-$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data
+        fi
+    fi
     # fallback time for broken hosts
     date '+@%s' > $BUILD_ROOT/.build/.date
     # we're done with the root file system, unmount