X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=6e0f0dc3024bfbf6f80eb672f54f695b0cf9fdd2;hb=f485fbbfe8503d9bf6b2e0199d0e99e8487b74e4;hp=88759f7face4c4d6f9183542453711478b9d028f;hpb=9eb0e2a413a683eed5993523f5baedf00fa73467;p=dgit.git diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index 88759f7f..6e0f0dc3 100755 --- a/infra/dgit-repos-policy-debian +++ b/infra/dgit-repos-policy-debian @@ -98,15 +98,16 @@ sub apiquery ($) { sub specific_suite_has_vsn_in_our_history ($) { my ($suite) = @_; - my $in_suite = apiquery "/dsc_in_suite/$suite/$pkg"; + my $in_suite = apiquery "dsc_in_suite/$suite/$pkg"; foreach my $entry (@$in_suite) { my $vsn = $entry->{version}; die "$pkg ?" unless defined $vsn; - my $tag = debiantag $vsn; - $?=0; my $r = system qw(git show-ref --verify --quiet), $tag; + my $tagref = "refs/tags/".debiantag $vsn; + printdebug " checking history suite=$suite vsn=$vsn tagref=$tagref\n"; + $?=0; my $r = system qw(git show-ref --verify --quiet), $tagref; return 1 if !$r; next if $r==256; - die "$pkg tag $tag $? $!"; + die "$pkg tagref $tagref $? $!"; } return 0; } @@ -116,7 +117,7 @@ sub new_has_vsn_in_our_history () { } sub good_suite_has_vsn_in_our_history () { - my $suites = apiquery "/suites"; + my $suites = apiquery "suites"; foreach my $suitei (@$suites) { my $suite = $suitei->{name}; die unless defined $suite; @@ -191,8 +192,8 @@ sub add_taint ($$) { $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 ($$) { @@ -251,6 +252,8 @@ sub deliberately ($) { return $deliberately{$_[0]}; } sub action_push () { getpackage(); + getpushinfo(); + return 0 unless $pkg_exists; return 0 unless $pkg_secret; @@ -275,8 +278,9 @@ sub action_push () { 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(<