chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit-repos-policy-debian: Fix add_taint
[dgit.git]
/
infra
/
dgit-repos-policy-debian
diff --git
a/infra/dgit-repos-policy-debian
b/infra/dgit-repos-policy-debian
index ac427127464f4c932baa460a9e8ad170626d552f..b25a560109f96b719b1f3b951da1589edcda6706 100755
(executable)
--- a/
infra/dgit-repos-policy-debian
+++ b/
infra/dgit-repos-policy-debian
@@
-150,21
+150,28
@@
sub getpackage () {
}
sub add_taint ($$) {
}
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 $!;
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 $!;
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>;
die $!;
}
close $tf or die $!;
$_ = <GCF>;
+ defined $_ or die;
m/^(\w+) (\w+) (\d+)\n/ or die "$_ ?";
my $gitobjid = $1;
my $gitobjtype = $2;
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".
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);
" VALUES (?,?,?,?,?,?)", {},
$pkg, $gitobjid, $gitobjtype, $gitobjdata, time, $reason);
@@
-186,7
+193,7
@@
sub add_taint ($$) {
die unless defined $taint_id;
$poldbh->do("INSERT INTO taintoverrides".
die unless defined $taint_id;
$poldbh->do("INSERT INTO taintoverrides".
- " (taint_id, deliberately)"
,
+ " (taint_id, deliberately)"
.
" VALUES (?, 'include-questionable-history')", {},
$taint_id);
}
" VALUES (?, 'include-questionable-history')", {},
$taint_id);
}