Eliminate directory_keyrings procedure
authorJacob Bachmeyer <jcb@gnu.org>
Tue, 8 Aug 2023 01:24:22 +0000 (20:24 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Tue, 8 Aug 2023 01:24:22 +0000 (20:24 -0500)
This was called in exactly one place, where it has been inlined.

gatekeeper.pl

index fb8c6daac46f37d93a5241b0a98b14971b3f8443..f649015efd58ae7b3fe132d6c32169ed5b92d32c 100755 (executable)
@@ -1403,24 +1403,6 @@ sub directory_configuration_files {
   return grep -f $_ && -r _ && -s _, @candidates;
 }
 
-=item @keyrings = directory_keyrings ( $directory )
-
-Return list of keyrings present in package configuration and applicable to
-DIRECTORY, which is a directory name object beginning with the appropriate
-package.
-
-=cut
-
-sub directory_keyrings {
-  my $directory = shift;
-
-  my @keyrings = directory_configuration_files('pubring.gpg', $directory);
-
-  ftp_syslog debug => "DEBUG: found keyring $_" for @keyrings;
-
-  return @keyrings;
-}
-
 =item @addresses = directory_email_addresses ( $directory )
 
 Return list of email addresses configured to receive notification of
@@ -2047,7 +2029,9 @@ BEGIN {
     return @{$self->{auth_keyrings}} if $self->{auth_keyrings};
 
     # Check that we have a keyring for this package:
-    my @keyrings = ::directory_keyrings($self->target_directory);
+    my @keyrings = ::directory_configuration_files('pubring.gpg',
+                                                  $self->target_directory);
+    ftp_syslog debug => "DEBUG: found keyring $_" for @keyrings;
     unless (@keyrings) {
       my $package = $self->target_directory->package_name;
       throw package_configuration => package_name => $package,