Skip to content

Commit

Permalink
Fix multibuild by omitting alternative-project
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwiedemann committed Jan 2, 2019
1 parent 718abdb commit 1ee1049
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion rbk
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ fi
export vmtype
now=$(date +%s)
later=$(date --date=@$((now+datediff)) -u "+%FT%T")
alternativeproject="--alternative-project=$project"
if [[ $oscbuildparams =~ -M ]] ; then
alternativeproject=
fi
export OSC_BUILD_ROOT=/var/tmp/build-root.${slot}/
export VM_CUSTOMOPT=""
osc up -S
mkdir -p RPMS
osc build ${oscbuildextrapkg} --preload --nopreinstallimage --noservice --vm-type=kvm --alternative-project=$project ${oscbuildparams} $repo $pkg.spec 2>&1 | tee RPMS/.build.log2
osc build ${oscbuildextrapkg} --preload --nopreinstallimage --noservice --vm-type=kvm $alternativeproject ${oscbuildparams} $repo $pkg.spec 2>&1 | tee RPMS/.build.log2
if (( ${PIPESTATUS[0]} )) ; then
if grep -q "Error: build description file named '.*does not exist" RPMS/.build.log2 ; then
echo 2
Expand Down
6 changes: 5 additions & 1 deletion rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ oscopts+=(--define='%source_date_epoch_from_changelog Y' --define="%_buildhost $
#vmtype="--vm-type=kvm"
: ${project:=home:bmwiedemann:reproducible}
: ${repo:=openSUSE_Tumbleweed}
alternativeproject="--alternative-project=$project"
if [[ $oscbuildparams =~ -M ]] ; then
alternativeproject=
fi
rm -rf $OSC_BUILD_ROOT/home/abuild/rpmbuild/RPMS/ $OSC_BUILD_ROOT/.mount/.build.packages/RPMS/ $OSC_BUILD_ROOT/.build.log
rm -rf $OUTDIR
mkdir -p $OUTDIR
echo in-progress > $OUTDIR/.osc-build-retval
hostname > $OUTDIR/buildhost
set -x
osc build --keep-pkg=$OUTDIR/ --alternative-project "$project" --nopreinstallimage $debuginfo --noservice$rootforbuild ${oscbuildparams} $vmtype $clean "${oscopts[@]}" $repo $(basename `pwd`).spec "$@" 2>&1 | tee $OUTDIR/.build.log2
osc build --keep-pkg=$OUTDIR/ $alternativeproject --nopreinstallimage $debuginfo --noservice$rootforbuild ${oscbuildparams} $vmtype $clean "${oscopts[@]}" $repo $(basename `pwd`).spec "$@" 2>&1 | tee $OUTDIR/.build.log2
echo ${PIPESTATUS[0]} > $OUTDIR/.osc-build-retval
cp -a $OUTDIR/.osc-build-retval .
cp -a $OSC_BUILD_ROOT/.build.log $OUTDIR/
Expand Down

0 comments on commit 1ee1049

Please sign in to comment.