From 456bb2657b2c04fecad6210852be15582c443d48 Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Mon, 21 May 2007 15:09:19 +0000 Subject: get_repsys_conf() didn't really got Repsys config, just emails from the static file. Changed it for get_author_email(), which uses repsys command itself to get the email. Should fix bug #30904. --- lib/Iurt/Config.pm | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'lib/Iurt/Config.pm') diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm index 9efcd24..2323481 100644 --- a/lib/Iurt/Config.pm +++ b/lib/Iurt/Config.pm @@ -17,7 +17,7 @@ our @EXPORT = qw( get_maint get_date get_prefix - get_repsys_conf + get_author_email check_arch check_noarch get_package_prefix @@ -238,25 +238,13 @@ sub get_maint { $maint, $srpm_name; } -sub get_repsys_conf { - my ($file) = @_; - open my $fh, $file or return; - my %mail; - my $ok; - local $_; - while (<$fh>) { - if (/\[users\]/) { - $ok = 1; - } elsif (/\[/) { - $ok = 0; - } - $ok or next; - my ($user, $mail) = split " = "; - chomp $mail; - $mail{$user} = $mail; - $mail or next; - } - \%mail; +# TODO: would be nicer (really?) to use repsys configuration directly, and +# query the users list in there and LDAP according to it +sub get_author_email { + my ($user) = @_; + my $authoremail = `repsys authoremail $user 2>/dev/null`; + + return $authoremail; } sub check_noarch { -- cgit v1.2.1