Prepare for DLRN modular build driver structure

Previously, the delorean_setup function modified DLRN's build_rpm.sh
script to make sure that the built rpms would not be installed as
part of the mock build in its chroot.

Since [1], DLRN will change the way it builds packages to use a driver
structure, and the build_rpm.sh script will no longer exist. On
the flip side, the default mock driver gives an option to skip
installation in the mock call, so we can simply use it.

[1] - https://softwarefactory-project.io/r/12039

Change-Id: I278da2ddf15a0b23ab522e63ac58c93043c4816f
This commit is contained in:
Javier Pena 2018-04-24 16:44:39 +02:00 committed by Javier Peña
parent 11f888e0e1
commit b1e5327eb2
1 changed files with 8 additions and 3 deletions

View File

@ -405,7 +405,7 @@ function delorean_setup {
sudo usermod -G mock -a $(id -nu)
mkdir -p $TRIPLEO_ROOT
[ -d $TRIPLEO_ROOT/delorean ] || git clone https://github.com/openstack-packages/delorean.git $TRIPLEO_ROOT/delorean
[ -d $TRIPLEO_ROOT/delorean ] || git clone https://github.com/softwarefactory-project/DLRN.git $TRIPLEO_ROOT/delorean
pushd $TRIPLEO_ROOT/delorean
@ -416,8 +416,13 @@ function delorean_setup {
sed -i -e "s%target=.*%target=centos%" projects.ini
# Remove the rpm install test to speed up delorean (our ci test will to this)
# TODO: add an option for this in delorean
sed -i -e 's%--postinstall%%' scripts/build_rpm.sh
if [ -f scripts/build_rpm.sh ]; then
# DLRN < 0.8.0
sed -i -e 's%--postinstall%%' scripts/build_rpm.sh
else
# This is an option in DLRN since 0.8.0 for the mock build driver
sed -i -e 's/^#install_after_build=1.*/install_after_build=0/' projects.ini
fi
virtualenv venv
# NOTE(pabelanger): We need to update setuptools to the latest version for