X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=infra%2Fdgit-repos-policy-debian;h=6e0f0dc3024bfbf6f80eb672f54f695b0cf9fdd2;hp=dd2a9c80be10bffb2828f06217d9c97a1a2edf1f;hb=f485fbbfe8503d9bf6b2e0199d0e99e8487b74e4;hpb=ec99fb2d75264668e6f7e6628bb3c87c1b69f332 diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian index dd2a9c80..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; @@ -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(<