From 33fb2847cd32c34c1a71235c0e2bb4abdb036e6b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Jul 2011 15:23:33 -0500 Subject: [PATCH] Import version as of 2011-07-29 for upload-ftp-v1.1.pl --- upload-ftp-v1.1.pl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/upload-ftp-v1.1.pl b/upload-ftp-v1.1.pl index 46aea1f..4e9fcba 100755 --- a/upload-ftp-v1.1.pl +++ b/upload-ftp-v1.1.pl @@ -155,6 +155,9 @@ my $master_keyring = "/home/gatekpr/etc/master_pubring.gpg"; # but associated e-mail addresses are not. Ward, 2011-02-08. my $email_blacklist = "/home/gatekpr/etc/email_blacklist"; +# List of all package maintainers +my $maintainers_bypkg = "/home/gatekpr/etc/maintainers.bypkg"; + my $log_style = 'GNU'; $log_style = 'Alpha' if ($style eq 'alpha'); $log_style = 'Distros' if ($style eq 'distros'); @@ -395,7 +398,7 @@ sub scan_incoming { # absolute, since lsof outputs absolute names. # - my @lsof_args = ("/home/gatekpr/bin/lsof", "-Fn", + my @lsof_args = ("/usr/bin/lsof", "-Fn", map { "$incoming_dir/$_" } keys %possible); my $pid = open (LSOF, "-|"); @@ -529,6 +532,23 @@ sub email_addresses { } close (EMAIL_FILE) || ftp_warn("close($package_config_base/$package_name/email) failed: $!"); + + # Now also look for all maintainer addresses in the maintainers.bypkg file + open (EMAIL_FILE, "<", "$maintainers_bypkg"); + while () { + chomp; + my @tmp = split(/ - /,$_,2); + next unless ($tmp[0] eq $package_name); + # The while loop below needs a proper scalar to work. + my $e = $tmp[1]; + while ($e =~ /([[:graph:]]+@[[:graph:]]+)/g) { + my $f = $1; + $f =~ s/[<>,]//g; + push (@ret, $f) unless exists {map { $_ => 1 } @ret}->{$f}; + } + } + close (EMAIL_FILE); + return @ret; } -- 2.25.1