summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-18 14:56:36 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-19 16:49:18 +0200
commitecb8e9d77faf1940c0defb78f0078f66562373b7 (patch)
tree7191157175eeb2b9f9abe2ee012492ac400a1121
parenta6ae3d3df490e7a5a1c8324ba9dc2e63972b1529 (diff)
prepare-release: Use equivs and gdebi-core for travis deps
Our previous hack did not really support or groups and other more advanced dependency types. This hack basically removes build profiles, and the @-type depends for tests, and otherwise converts the deps to a package which is then installed via gdebi.
-rw-r--r--.travis.yml2
-rwxr-xr-xprepare-release28
2 files changed, 26 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 424172e04..7931bb39a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,9 +9,9 @@ before_install:
sudo sh -c '/bin/echo -e "Package: *\nPin: release n=xenial\nPin-Priority: 1" > /etc/apt/preferences.d/xenial'
- sudo apt-get update -qq
install:
- - sudo ./prepare-release travis-ci
- sudo apt-get -qq -y -t wily install gettext liblz4-dev python3-apt
- sudo apt-get -qq -y -t xenial install cmake
+ - sudo ./prepare-release travis-ci
before_script:
- ( mkdir build && cd build && cmake .. )
- make -C build -j4
diff --git a/prepare-release b/prepare-release
index 1e434a305..f740f2152 100755
--- a/prepare-release
+++ b/prepare-release
@@ -26,6 +26,26 @@ librarysymbolsfromfile() {
done | sort -u
}
+test_deb_control() {
+ echo "Package: apt-test-depends"
+ echo "Version: 1.0"
+ echo "Architecture: all"
+ printf "Depends:"
+ (
+ for i in Build-Depends Build-Depends-Indep Build-Depends-Arch; do
+ grep-dctrl -ns $i -S apt ./debian/control && echo ,
+ done
+ grep-dctrl -ns Depends -F Tests run-tests ./debian/tests/control
+ ) | tr '\n' ' '\
+ | sed -r -e 's#<[^,<>()@]*>##g' \
+ -e 's#@[^,<>()@]*@##g' \
+ -e 's#dpkg-dev \([^)]*\)#dpkg-dev#g' \
+ -e 's#debhelper \([^)]*\)#debhelper#g' \
+ -e 's#@##g' \
+ -e 's#,(\s+,)+#, #g' \
+ -e 's#\s+# #g'
+}
+
if [ "$1" = 'pre-export' ]; then
libraryversioncheck() {
local LIBRARY="$1"
@@ -158,9 +178,11 @@ elif [ "$1" = 'buildlog' ]; then
shift
done
elif [ "$1" = 'travis-ci' ]; then
- apt-get install -qy --no-install-recommends dctrl-tools
- apt-get install -qy --no-install-recommends $(grep-dctrl -S -s Build-Depends,Build-Depends-Indep,Build-Depends-Arch apt ./debian/control | sed -e 's#([^)]*)##g' -e 's#^Build-Depends\(-Indep\|-Arch\)\?: ##' -e 's#<.*>##g' | tr -s '\n,' ' ')
- apt-get install -qy --no-install-recommends $(grep-dctrl -F Tests -s Depends run-tests ./debian/tests/control | tr -s '\n,' ' ' | cut -d'@' -f 4- | sed -e 's#gnupg1#gnupg2#' -e 's#gpgv1#gpgv2#')
+ apt-get install -qy --no-install-recommends dctrl-tools equivs gdebi-core
+
+ test_deb_control > test-control
+ equivs-build test-control
+ gdebi -n apt-test-depends_1.0_all.deb
elif [ "$1" = 'coverage' ]; then
DIR="${2:-./coverage}"
git clean -dfX # remove ignored build artefacts for a clean start