diff options
Diffstat (limited to 'emi')
-rwxr-xr-x | emi | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -267,6 +267,10 @@ sub upload_prefix_in_section { my (@packages, @duplicate_packages); my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+$/; my $target = $pkg_tree{$prefix}{target}; + my $youri_file = "$prefix.youri"; + if ($uploaded{$prefix}{$section}) { + $youri_file .= "." . time(); + } my $path = $pkg_tree{$prefix}{section}{$section}{path}; @@ -289,7 +293,7 @@ sub upload_prefix_in_section { $user ||= $config->{upload_user}; # FIXME we want to skip all post, we should not hardcode them here my $skip = $o_finish ? "" : "--skip-post genhdlist2 --skip-post mirror --skip-post clean_rpmsrate"; - my $command = "/usr/bin/perl -I/usr/share/mga-youri-submit/lib /usr/share/mga-youri-submit/bin/youri-submit --verbose --config /etc/youri/submit-upload.conf --define user=$user --define prefix=$prefix --define section=$section $skip $target @packages &> $done/$path/$prefix.youri"; + my $command = "/usr/bin/perl -I/usr/share/mga-youri-submit/lib /usr/share/mga-youri-submit/bin/youri-submit --verbose --config /etc/youri/submit-upload.conf --define user=$user --define prefix=$prefix --define section=$section $skip $target @packages &> $done/$path/$youri_file"; plog('DEBUG', "running $command"); if (!system($command)) { @@ -301,7 +305,7 @@ sub upload_prefix_in_section { foreach my $rpm (@{$pkg_tree{$prefix}{section}{$section}{rpms}}) { link("$done/$path/${prefix}_$rpm", "$reject/$path/${prefix}_$rpm") or plog('ERROR', "ERROR: link of $rpm failed ($!)"); } - link("$done/$path/$prefix.youri", "$reject/$path/$prefix.youri"); + link("$done/$path/$youri_file", "$reject/$path/$youri_file"); my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+/; if ($user) { @@ -309,7 +313,7 @@ sub upload_prefix_in_section { 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}>"; - $text .= "\nUpload log available in $config->{http_queue}/rejected/$path/$prefix.youri\n"; + $text .= "\nUpload log available in $config->{http_queue}/rejected/$path/$youri_file\n"; sendmail($to, undef, "Upload failed for $rpms", $text, "Emi the upload bot <$config->{admin}>", 0, $config); } |