From: Ian Jackson Date: Sat, 4 Jun 2016 18:46:07 +0000 (+0100) Subject: dgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!). X-Git-Tag: archive/debian/2.0~337 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=f9da2ff21675a630444be1a65ac27fe387581f26;hp=86daff8924bab3297885cfe375341bf3f4ffe09c dgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!). --- diff --git a/debian/changelog b/debian/changelog index 7543f58e..21726d08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,8 @@ dgit (1.5~~) unstable; urgency=medium Infrastructure: * Better error handling in dgit-repos-policy-debian. + * dgit-repos-policy-debian.: fix git-cat-file-handling with multiple + taints in db (!). Documentation: * Document the dgit-distro.DISTRO.quilt-mode config setting. diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index d687a3e0..4dab576f 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -352,9 +352,6 @@ END my $mustreject=0; while (my $taintid = shift @taintids) { - # git cat-file prints a spurious newline after it gets EOF - # This is not documented. I guess it might go away. So we - # just read what we expect and then let it get SIGPIPE. $!=0; $_ = ; die "($taintid @objscatcmd) $!" unless defined $_; printdebug "|< ", $_ if $debuglevel>=2; @@ -367,6 +364,10 @@ END (read CHKOUT, $drop, $nbytes) == $nbytes or die "($taintid @objscatcmd) $!"; + $!=0; $_ = ; + die "($taintid @objscatcmd) $!" unless defined $_; + die "($taintid @objscatcmd) $_ ?" if m/\S/; + $taintinfoq ||= $poldbh->prepare(<