summaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
Diffstat (limited to 'infra')
-rwxr-xr-xinfra/dgit-repos-policy-debian15
1 files changed, 11 insertions, 4 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index ac42712..b25a560 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -150,21 +150,28 @@ sub getpackage () {
}
sub add_taint ($$) {
- my ($refobj, $reason);
+ my ($refobj, $reason) = @_;
+
+ printdebug "TAINTING $refobj\n",
+ (map { "\%| $_" } split "\n", $reason),
+ "\n";
my $tf = new File::Temp or die $!;
print $tf "$refobj^0\n" or die $!;
+ flush $tf or die $!;
+ seek $tf,0,0 or die $!;
my $gcfpid = open GCF, "-|";
defined $gcfpid or die $!;
if (!$gcfpid) {
open STDIN, "<&", $tf or die $!;
- exec 'git', 'cat-file';
+ exec 'git', 'cat-file', '--batch';
die $!;
}
close $tf or die $!;
$_ = <GCF>;
+ defined $_ or die;
m/^(\w+) (\w+) (\d+)\n/ or die "$_ ?";
my $gitobjid = $1;
my $gitobjtype = $2;
@@ -178,7 +185,7 @@ sub add_taint ($$) {
close GCF;
$poldbh->do("INSERT INTO taints".
- " (package, gitobjid, gitobjtype, gitobjdata, time, comment)",
+ " (package, gitobjid, gitobjtype, gitobjdata, time, comment)".
" VALUES (?,?,?,?,?,?)", {},
$pkg, $gitobjid, $gitobjtype, $gitobjdata, time, $reason);
@@ -186,7 +193,7 @@ sub add_taint ($$) {
die unless defined $taint_id;
$poldbh->do("INSERT INTO taintoverrides".
- " (taint_id, deliberately)",
+ " (taint_id, deliberately)".
" VALUES (?, 'include-questionable-history')", {},
$taint_id);
}