our $distro = shift @ARGV // die "need DISTRO";
our $repos = shift @ARGV // die "need DGIT-REPOS-DIR";
our $dgitlive = shift @ARGV // die "need DGIT-LIVE-DIR";
+our $distrodir = shift @ARGV // die "need DISTRO-DIR";
our $action = shift @ARGV // die "need ACTION";
our $publicmode = 02775;
$poldbh->do("INSERT INTO taintoverrides".
" (taint_id, deliberately)".
- " VALUES (?, 'include-questionable-history')", {},
- $taint_id);
+ " VALUES (?, '--deliberately-include-questionable-history')",
+ {}, $taint_id);
}
sub add_taint_by_tag ($$) {
my $age = time - $mtime;
printdebug "check_package age=$age\n";
- return 1 if $age < $new_upload_propagation_slop;
+ return 0 if $age < $new_upload_propagation_slop;
- return if new_has_vsn_in_our_history();
+ return 0 if new_has_vsn_in_our_history();
if (good_suite_has_vsn_in_our_history) {
chmod $publicmode, "." or die $!;
sub action_push () {
getpackage();
+ getpushinfo();
+
return 0 unless $pkg_exists;
return 0 unless $pkg_secret;
sub action_push_confirm () {
getpackage();
- die unless @ARGV >= 5;
- my $freshrepo = $ARGV[4];
+ getpushinfo();
+ die unless @ARGV >= 1;
+ my $freshrepo = shift @ARGV;
my $initq = $poldbh->prepare(<<END);
SELECT taint_id, gitobjid FROM taints t
my ($taintinfoq,$overridesanyq,$untaintq,$overridesq);
my $overridesstmt = <<END;
- SELECT deliberately FROM taintoverrides WHERE ( 1
+ SELECT deliberately FROM taintoverrides WHERE (
+ 1=0
END
my @overridesv = sort keys %deliberately;
- $overridesstmt .= join '', (<<END x @overridesv);
+ $overridesstmt .= <<END foreach @overridesv;
OR deliberately = ?
END
$overridesstmt .= <<END;
Reason: $ti->{comment}
END
+ printdebug "SQL overrides: @overridesv $taintid /\n$overridesstmt\n";
+
$overridesq ||= $poldbh->prepare($overridesstmt);
$overridesq->execute(@overridesv, $taintid);
my ($ovwhy) = $overridesq->fetchrow_array();
printdebug sprintf "chmod %#o (was %#o) %s\n",
$newmode, $oldmode, $freshrepo;
chmod $newmode, $freshrepo or die $!;
+ utime undef, undef, $freshrepo or die $!;
}
}