summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-17 15:16:06 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-31 22:55:01 +0100
commit8a178bf100d49ad948f5f3ec5540da1ff9c74c3e (patch)
tree78f5f5fe994066680101d4086b2f222597702a2d
parent349b41c2bded6dea53dd947e4ee5c16867b6d055 (diff)
Tag change: Update dgit-repos-policy-debian
The only place where we call debiantag, and the only place where we know about tag names, is in vsn_in_our_history. We need to change it to query multiple tags. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xinfra/dgit-repos-policy-debian20
1 files changed, 14 insertions, 6 deletions
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index 62a275a..e37690c 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -109,12 +109,20 @@ sub apiquery ($) {
sub vsn_in_our_history ($) {
my ($vsn) = @_;
- my $tagref = "refs/tags/".debiantag_old $vsn, $distro;
- printdebug " checking history vsn=$vsn tagref=$tagref\n";
- $?=0; my $r = system qw(git show-ref --verify --quiet), $tagref;
- return 1 if !$r;
- return 0 if $r==256;
- die "$pkg tagref $tagref $? $!";
+ # Eventually, when we withdraw support for old-format (DEP-14
+ # namespace) tags, we will need to change this to only look
+ # for debiantag_new. See the commit
+ # "Tag change: Update dgit-repos-policy-debian"
+ # (reverting which is a good start for that change).
+
+ my @tagrefs = map { "refs/tags/".$_ } debiantags $vsn, $distro;
+ printdebug " checking history vsn=$vsn tagrefs=@tagrefs\n";
+ open F, "-|", qw(git-for-each-ref), @tagrefs;
+ $_ = <F>;
+ close F;
+ return 1 if defined && m/\S/;
+ die "$pkg tagrefs @tagrefs $? $!" if $?;
+ return 0;
}
sub specific_suite_has_suitable_vsn ($$) {