chiark / gitweb /
dgit-repos-policy-debian.: fix git-cat-file-handling with multiple taints in db (!).
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 4 Jun 2016 18:46:07 +0000 (19:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 15:47:46 +0000 (16:47 +0100)
debian/changelog
infra/dgit-repos-policy-debian

index 7543f58ea2235423458da2c1571e0e81791a882c..21726d084e944345e45e65929715f29b27f8dfd7 100644 (file)
@@ -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.
index d687a3e065501d3ffea00b238333ceb291e35133..4dab576f1a4257e3bff41aef8ac4f4b1d30105f1 100755 (executable)
@@ -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; $_ = <CHKOUT>;
        die "($taintid @objscatcmd) $!" unless defined $_;
        printdebug "|< ", $_ if $debuglevel>=2;
@@ -367,6 +364,10 @@ END
        (read CHKOUT, $drop, $nbytes) == $nbytes
            or die "($taintid @objscatcmd) $!";
 
+       $!=0; $_ = <CHKOUT>;
+       die "($taintid @objscatcmd) $!" unless defined $_;
+       die "($taintid @objscatcmd) $_ ?" if m/\S/;
+
        $taintinfoq ||= $poldbh->prepare(<<END);
             SELECT package, time, comment FROM taints WHERE taint_id =  ?
 END