summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonghee Han <onstudy@samsung.com>2016-04-05 17:07:23 +0900
committerpark <sk7.park@samsung.com>2016-04-08 22:37:21 -0700
commit43a15ec55888f27e1377df0066898fd079510a9c (patch)
treeae5f2d12e05d1a781783ef21033a45d4a80bc675
parent21a9a476339e3ff7dd1e1026a6d454d298515bc4 (diff)
downloadbuild-43a15ec55888f27e1377df0066898fd079510a9c.tar.gz
build-43a15ec55888f27e1377df0066898fd079510a9c.tar.bz2
build-43a15ec55888f27e1377df0066898fd079510a9c.zip
Feature : create new 'rpmbuildstage:' option on OBS.release-20160411release-20160315
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: I5b24b370c76e352b6a872e7e329ac49b9cfd7762 (cherry picked from commit 5de2f8e79be61c2d405302aaa1dba961a3129c81)
-rw-r--r--Build.pm2
-rwxr-xr-xbuild4
2 files changed, 6 insertions, 0 deletions
diff --git a/Build.pm b/Build.pm
index 5024405..565e54e 100644
--- a/Build.pm
+++ b/Build.pm
@@ -297,6 +297,8 @@ sub read_config {
} else {
push @{$config->{'constraint'}}, $l;
}
+ } elsif ($l0 eq 'rpmbuildstage:') { # use the rpmbuild --stage option
+ $config->{'rpmbuildstage'} = $l[0];
} elsif ($l0 !~ /^[#%]/) {
warn("unknown keyword in config: $l0\n");
}
diff --git a/build b/build
index bc64a85..68acb06 100755
--- a/build
+++ b/build
@@ -2192,6 +2192,10 @@ for SPECFILE in "${SPECFILES[@]}" ; do
echo "VM_TYPE='$VM_TYPE'" >> $BUILD_ROOT/.build/build.data
echo "shell='$shell'" >> $BUILD_ROOT/.build/build.data
echo "statistics='$statistics'" >> $BUILD_ROOT/.build/build.data
+ # use the rpmbuild --stage option
+ if [ ! -z $BUILD_RPM_BUILD_STAGE ]; then
+ echo "BUILD_RPM_BUILD_STAGE='-$BUILD_RPM_BUILD_STAGE'" >> $BUILD_ROOT/.build/build.data
+ fi
# fallback time for broken hosts
date '+@%s' > $BUILD_ROOT/.build/.date
if [ "$VM_TYPE" = 'emulator' ]; then