diff options
author | Gustavo De Nardin <spuk@mandriva.org> | 2007-06-26 14:13:43 +0000 |
---|---|---|
committer | Gustavo De Nardin <spuk@mandriva.org> | 2007-06-26 14:13:43 +0000 |
commit | 9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea (patch) | |
tree | 9e541a3e1abd14544d90eb5a0472ae93ff0bcea8 /emi | |
parent | 96b2a46bf03035920e73597af096516830e65ae8 (diff) | |
download | iurt-9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea.tar iurt-9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea.tar.gz iurt-9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea.tar.bz2 iurt-9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea.tar.xz iurt-9c9d1c3bd2dbea68c93920f9bd2ed8de5eb9e1ea.zip |
- get rid of email guessing
- mail bot admin only in case the author cannot be found
- a bit more info in a log message
Diffstat (limited to 'emi')
-rwxr-xr-x | emi | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -60,10 +60,6 @@ my %config_usage = ( desc => "Renaming of arch", default => { 'sparc64' => 'sparcv9' } }, - default_mail_domain => { - desc => "Default mail domain to append", - default => 'mandriva.org' - }, http_queue => { desc => 'Address where log can be consulted', default => 'http://kenobi.mandriva.com/queue/' @@ -219,7 +215,7 @@ foreach my $prefix (keys %pkg_tree) { plog('OK', "all archs done: $prefix"); foreach my $rpm (@{$pkg_tree{$prefix}{rpms}}) { push @packages, "$done/$path/${prefix}_$rpm"; - plog('OK', " uploading $rpm"); + plog('OK', " uploading $rpm in $done/$path"); } $user ||= $config->{upload_user}; @@ -263,10 +259,11 @@ foreach my $prefix (keys %pkg_tree) { $rpms .= "$rpm "; $text .= "- $rpm\n"; } - my $to = get_author_email($user) || "$user\@$config->{default_mail_domain}"; + my $to = get_author_email($user) || "Unknown <$config->{admin}>"; + my $cc = undef; $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); + sendmail($to, $cc, "Upload failed for $rpms", $text, "Emi the upload bot <$config->{admin}>", 0); } # should delete the files |