chiark / gitweb /
Tag change: Rename debiantag to debiantag_old
[dgit.git] / infra / dgit-repos-server
index 92f197b0b001b31bc5dd11907ab7ab1c1359a00f..ea223a0c33bddcd18fe5089ac74013a878dd0b89 100755 (executable)
@@ -33,7 +33,9 @@
 # (With --cron AUTH-SPEC is not used and may be the empty string.)
 
 use strict;
-$SIG{__WARN__} = sub { die $_[0]; };
+
+use Debian::Dgit qw(:DEFAULT :policyflags);
+setup_sigwarn();
 
 # DGIT-REPOS-DIR contains:
 # git tree (or other object)      lock (in acquisition order, outer first)
@@ -189,8 +191,6 @@ use Fcntl qw(:flock);
 use File::Path qw(rmtree);
 use File::Temp qw(tempfile);
 
-use Debian::Dgit qw(:DEFAULT :policyflags);
-
 initdebug('');
 
 our $func;
@@ -342,7 +342,7 @@ sub movetogarbage () {
 
     ensuredir "$dgitrepos/_removed-tags";
     open PREVIOUS, ">>", removedtagsfile or die removedtagsfile." $!";
-    git_for_each_ref('refs/tags/'.debiantag('*',$distro), sub {
+    git_for_each_ref('refs/tags/'.debiantag_old('*',$distro), sub {
        my ($objid,$objtype,$fullrefname,$reftail) = @_;
        print PREVIOUS "\n$objid $reftail .\n" or die $!;
     }, $real);
@@ -624,7 +624,7 @@ sub dm_txt_check ($$) {
     printdebug " dm_txt_check $keyid $dmtxtfn\n";
     open DT, '<', $dmtxtfn or die "$dmtxtfn $!";
     while (<DT>) {
-       m/^fingerprint:\s+$keyid$/oi
+       m/^fingerprint:\s+\Q$keyid\E$/oi
            ..0 or next;
        if (s/^allow:/ /i..0) {
        } else {
@@ -821,7 +821,7 @@ sub checks () {
     tagh1('object') eq $commit or reject "tag refers to wrong commit";
     tagh1('tag') eq $tagname or reject "tag name in tag is wrong";
 
-    my $expecttagname = debiantag $version, $distro;
+    my $expecttagname = debiantag_old $version, $distro;
     printdebug "expected tag $expecttagname\n";
     $tagname eq $expecttagname or die;