From 33b8db6023e54db5f56dd37bff6c58dfb681e49c Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Mon, 7 Aug 2023 20:24:22 -0500 Subject: [PATCH] Eliminate directory_keyrings procedure This was called in exactly one place, where it has been inlined. --- gatekeeper.pl | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/gatekeeper.pl b/gatekeeper.pl index fb8c6da..f649015 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -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, -- 2.25.1