chiark / gitweb /
dgit-repos-policy-debian: Better error handling
[dgit.git] / infra / dgit-repos-server
index 92f197b0b001b31bc5dd11907ab7ab1c1359a00f..cfa0f314fffc312b08aa9b47395215d1d7cc0671 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;
@@ -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 {