diff options
Diffstat (limited to 'lib/Iurt/Config.pm')
-rw-r--r-- | lib/Iurt/Config.pm | 28 |
1 files changed, 8 insertions, 20 deletions
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 { |