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. --- emi | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'emi') diff --git a/emi b/emi index 41b3c82..e1921d3 100755 --- a/emi +++ b/emi @@ -29,7 +29,7 @@ use strict; use MDK::Common; -use Iurt::Config qw(config_usage get_date config_init dump_cache init_cache get_repsys_conf); +use Iurt::Config qw(config_usage get_date config_init dump_cache init_cache get_author_email); use Iurt::Process qw(check_pid); use Iurt::Mail qw(sendmail); use Iurt::File qw(check_upload_tree); @@ -88,10 +88,6 @@ my %config_usage = ( desc => 'User who is uploading packages', default => 'mandrake' }, - repsys_conf => { - desc => 'Path of repsys.conf file with login mail corresponding', - default => '/etc/repsys.conf' - }, queue => { desc => 'root directory of the various upload queues', default => '/home/mandrake/uploads/' @@ -113,8 +109,6 @@ if (-f $configfile) { config_usage(\%config_usage, $config) if $run{config_usage}; config_init(\%config_usage, $config, \%run); -my $mail = get_repsys_conf($config->{repsys_conf}); - $run{pidfile_home} = $config->{tmp}; $run{pidfile} = "upload"; my $pidfile = check_pid(\%run); @@ -269,7 +263,7 @@ foreach my $prefix (keys %pkg_tree) { $rpms .= "$rpm "; $text .= "- $rpm\n"; } - my $to = $mail->{$user} || "$user\@mandriva.com, $user\@mandriva.org"; + my $to = get_author_email($user) || "$user\@$config->{default_mail_domain}"; $text .= "\nUpload log available in $config->{http_queue}/rejected/$path/$prefix.youri\n"; sendmail($to, $config->{admin} , "Upload failed for $rpms", $text, "Emi the upload bot <$config->{admin}>", 0); -- cgit v1.2.1