From: Ian Jackson Date: Mon, 19 Dec 2016 16:57:16 +0000 (+0000) Subject: Merge remote-tracking branch 'spwhitton/maint-merge-updates' into fix X-Git-Tag: archive/debian/2.12~19 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=06398ebf1c535adf0aa818f8a3540fe1a0ce30b4;hp=da5c112f69107f6294551eae3d023dc916d46994 Merge remote-tracking branch 'spwhitton/maint-merge-updates' into fix --- diff --git a/debian/changelog b/debian/changelog index 90750900..f6d9272d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +dgit (2.12~) unstable; urgency=medium + + * Fix dgit-repos-policy-debian which broke due to recent git setting + GIT_ALTERNATE_OBJECT_DIRECTORIES in the pre-receive-hook. + + Test suite: + * Provide and use stunt lintian and debuild, to avoid lintian + complaining about our stupid test packages. + + -- + dgit (2.11) unstable; urgency=medium Documentation: diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 48a42d93..cff5d06c 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -355,6 +355,10 @@ END my $checkpid = open CHKOUT, "-|" // die $!; if (!$checkpid) { open STDIN, "<&", $chkinput or die $!; + delete $ENV{GIT_ALTERNATE_OBJECT_DIRECTORIES}; + # ^ recent versions of git set this in the environment of + # receive hooks. This can cause us to see things which + # the user is trying to abolish. exec @objscatcmd or die $!; } diff --git a/tests/lib b/tests/lib index b033dde2..d075bc76 100644 --- a/tests/lib +++ b/tests/lib @@ -759,6 +759,16 @@ t-tstunt-parsechangelog () { t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm } +t-tstunt-lintian () { + t-tstunt lintian +} + +t-tstunt-debuild () { + : ${DGIT_TEST_REAL_DEBUILD:=$(type -p debuild)} + export DGIT_TEST_REAL_DEBUILD + t-tstunt debuild +} + t-incoming-dsc () { local dsc=${p}_${v}.dsc incoming_dsc=$tmp/incoming/$dsc diff --git a/tests/tests/gbp-orig b/tests/tests/gbp-orig index ffc145f3..29dd4570 100755 --- a/tests/tests/gbp-orig +++ b/tests/tests/gbp-orig @@ -3,6 +3,8 @@ set -e . tests/lib t-tstunt-parsechangelog +t-tstunt-debuild +t-tstunt-lintian t-archive-none example t-git-none diff --git a/tests/tstunt/debuild b/tests/tstunt/debuild new file mode 100755 index 00000000..2b2ca719 --- /dev/null +++ b/tests/tstunt/debuild @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +echo "DGIT TEST STUNT DEBUILD $*" >&2 +"${DGIT_TEST_REAL_DEBUILD}" --preserve-env --preserve-envvar PATH "$@" diff --git a/tests/tstunt/lintian b/tests/tstunt/lintian new file mode 100755 index 00000000..f7c29856 --- /dev/null +++ b/tests/tstunt/lintian @@ -0,0 +1,3 @@ +#!/bin/sh +echo >&2 'W: dgit test suite stunt lintian detects no problems' +exit 0