aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Config.pm
diff options
context:
space:
mode:
authorGustavo De Nardin <spuk@mandriva.org>2007-05-21 15:09:19 +0000
committerGustavo De Nardin <spuk@mandriva.org>2007-05-21 15:09:19 +0000
commit456bb2657b2c04fecad6210852be15582c443d48 (patch)
tree4cf47154bf2c7d96fee455375f8056e06b778a64 /lib/Iurt/Config.pm
parent688e2df749b62ca51410a0616c3561f02034cf5b (diff)
downloadiurt-456bb2657b2c04fecad6210852be15582c443d48.tar
iurt-456bb2657b2c04fecad6210852be15582c443d48.tar.gz
iurt-456bb2657b2c04fecad6210852be15582c443d48.tar.bz2
iurt-456bb2657b2c04fecad6210852be15582c443d48.tar.xz
iurt-456bb2657b2c04fecad6210852be15582c443d48.zip
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.
Diffstat (limited to 'lib/Iurt/Config.pm')
-rw-r--r--lib/Iurt/Config.pm28
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 {