aboutsummaryrefslogtreecommitdiffstats
path: root/emi
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-09-25 06:23:29 +0000
committerThierry Vignaud <tv@mageia.org>2012-09-25 06:23:29 +0000
commit9a8ca6c1f42cf96bdac0015617d79a11561a6c55 (patch)
tree55082d1dc500f4b306914ba113366a434ffa8ccc /emi
parent8f2d4b4f9d77b90fc669b70d501ad44b26417445 (diff)
downloadiurt-9a8ca6c1f42cf96bdac0015617d79a11561a6c55.tar
iurt-9a8ca6c1f42cf96bdac0015617d79a11561a6c55.tar.gz
iurt-9a8ca6c1f42cf96bdac0015617d79a11561a6c55.tar.bz2
iurt-9a8ca6c1f42cf96bdac0015617d79a11561a6c55.tar.xz
iurt-9a8ca6c1f42cf96bdac0015617d79a11561a6c55.zip
simplify
Diffstat (limited to 'emi')
-rwxr-xr-xemi10
1 files changed, 3 insertions, 7 deletions
diff --git a/emi b/emi
index c56236a..caf5b2b 100755
--- a/emi
+++ b/emi
@@ -277,13 +277,9 @@ sub upload_prefix_in_section {
my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+/;
if ($user) {
- my $text = qq(The upload of the following packages failed:\n);
- my $rpms;
- foreach my $rpm (@{$pkg_tree{$prefix}{section}{$section}{rpms}}) {
- $rpm =~ /src\.rpm$/ or next;
- $rpms .= "$rpm ";
- $text .= "- $rpm\n";
- }
+ my @pkgs = grep { !/src\.rpm$/ } @{$pkg_tree{$prefix}{section}{$section}{rpms}};
+ my $text = join("\n", qq(The upload of the following packages failed:\n), map { "- $_" } @pkgs) . "\n";
+ my $rpms = join(' ', @pkgs, undef);
my $to = get_author_email($user) || "Unknown <$config->{admin}>";
my $cc;
$text .= "\nUpload log available in $config->{http_queue}/rejected/$path/$prefix.youri\n";