summaryrefslogtreecommitdiff
path: root/infra/dgit-repos-policy-debian
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 13:13:28 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 20:08:38 +0000
commit7c08e628be1febbfd71491ab81e563fab220fb25 (patch)
treec90d6189609870445308d492eeaf2bc1c371d157 /infra/dgit-repos-policy-debian
parent3cb09a47af3a55f646d7808cd3bb78d0b907b36e (diff)
tainted-objects protocol: Reintroduce time, handle optionality
According to the poldb schema, gitobjtype is optional, so make it optional in the protocol too. Reintroduce time, as we're about to need it for calling the common message construction. Clarify what optionality means and implement it properly. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'infra/dgit-repos-policy-debian')
-rwxr-xr-xinfra/dgit-repos-policy-debian6
1 files changed, 5 insertions, 1 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index fc7f1b1..86794f5 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -546,7 +546,7 @@ sub polclqu_tainted_objects () {
check_package();
my $topq = $poldbh->selectall_arrayref(<<END,
- SELECT taint_id, gitobjtype, gitobjid, comment
+ SELECT taint_id, gitobjtype, gitobjid, time, comment
FROM taints
WHERE (package = ? OR package = '')
END
@@ -562,6 +562,10 @@ END
$row->{taint_id});
$row->{overrides} = [ map { $_->[0] } @$delibs ];
delete $row->{taint_id};
+ # remove any undef entries, for nice json
+ foreach my $k (keys %$row) {
+ defined $row->{$k} or delete $row->{$k};
+ }
}
if (defined(my $questionable_head_msg = package_questionable_head_msg())) {
# We would reject this in push. We need to arrange that the