diff options
author | Jan Blunck <jblunck@infradead.org> | 2014-07-08 21:12:51 +0200 |
---|---|---|
committer | Jan Blunck <jblunck@infradead.org> | 2014-07-08 21:12:51 +0200 |
commit | f25f6601d02c4712a1fbb43cf9ff81340bb13f41 (patch) | |
tree | ede156407274a97a5775fe6af6b378e18d384468 /build-recipe-livebuild | |
parent | 1b07f177e390a3d4623424cc4652edd1259f838e (diff) |
livebuild: Run OBS buildroot livebuild_pre_run hook before user provided one
We should not change the buildroot between the lb config and the lb build
calls. Therefore move the OBS buildroot hook to run first.
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Diffstat (limited to 'build-recipe-livebuild')
-rw-r--r-- | build-recipe-livebuild | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build-recipe-livebuild b/build-recipe-livebuild index 6707ad8..5e73bd7 100644 --- a/build-recipe-livebuild +++ b/build-recipe-livebuild @@ -168,6 +168,12 @@ EOF # TODO: Add the repository public key # cp ... $BUILD_ROOT/$TOPDIR/LIVEBUILD_ROOT/config/archives/debian.key + if [ -x $BUILD_ROOT/usr/lib/build/livebuild_pre_run ] ; then + echo "Running OBS build livebuild_pre_run hook" + chroot $BUILD_ROOT su -c "/usr/lib/build/livebuild_pre_run" - root \ + < /dev/null || cleanup_and_exit 1 + fi + # TODO: this might move to lb auto/config file if [ -f $BUILD_ROOT/$TOPDIR/SOURCES/livebuild_pre_run ] ; then cp $BUILD_ROOT/$TOPDIR/SOURCES/livebuild_pre_run \ @@ -176,10 +182,6 @@ EOF echo "Running package livebuild_pre_run hook" chroot $BUILD_ROOT su -c "/.build.livebuild_pre_run" - root \ < /dev/null || cleanup_and_exit 1 - elif [ -x $BUILD_ROOT/usr/lib/build/livebuild_pre_run ] ; then - echo "Running OBS build livebuild_pre_run hook" - chroot $BUILD_ROOT su -c "/usr/lib/build/livebuild_pre_run" - root \ - < /dev/null || cleanup_and_exit 1 fi chroot $BUILD_ROOT su -c "cd $TOPDIR/LIVEBUILD_ROOT && lb build" - root \ |