prefer `apt-get build-dep` if the current Debian version works
This commit is contained in:
parent
38ad096a13
commit
5b370ec68d
|
|
@ -15,9 +15,12 @@ if [[ ! -f $lockfile ]] ; then
|
||||||
apt-get -qy dist-upgrade
|
apt-get -qy dist-upgrade
|
||||||
|
|
||||||
cd $CI_PROJECT_DIR
|
cd $CI_PROJECT_DIR
|
||||||
export BUILD_DEPENDS=`sed 's/\s*|[^,]*,/,/g' debian/control | perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p'`
|
if ! apt-get -qy build-dep $CI_PROJECT_DIR; then
|
||||||
apt-get -qy install --no-install-recommends \
|
# this is running on an older version, like jessie-backports
|
||||||
build-essential dpkg-dev fakeroot git-buildpackage pristine-tar $BUILD_DEPENDS
|
export BUILD_DEPENDS=`sed 's/\s*|[^,]*,/,/g' debian/control | perl -ne 'next if /^#/; $p=(s/^Build-Depends:\s*/ / or (/^ / and $p)); s/,|\n|\([^)]+\)//mg; print if $p'`
|
||||||
|
apt-get -qy install --no-install-recommends \
|
||||||
|
build-essential dpkg-dev fakeroot git-buildpackage pristine-tar $BUILD_DEPENDS
|
||||||
|
fi
|
||||||
apt-get -qy autoremove --purge
|
apt-get -qy autoremove --purge
|
||||||
dpkg-checkbuilddeps
|
dpkg-checkbuilddeps
|
||||||
echo "ensure pristine-tar branch exists and is current"
|
echo "ensure pristine-tar branch exists and is current"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue