aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemi16
1 files changed, 13 insertions, 3 deletions
diff --git a/emi b/emi
index 9a1096f..fa1d66e 100755
--- a/emi
+++ b/emi
@@ -264,7 +264,7 @@ foreach my $prefix (sort keys %pkg_tree) {
sub upload_prefix_in_section {
my ($prefix, $section, $o_finish) = @_;
- my @packages;
+ my (@packages, @duplicate_packages);
my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+$/;
my $target = $pkg_tree{$prefix}{target};
@@ -272,7 +272,17 @@ sub upload_prefix_in_section {
plog('OK', "all mandatory archs done: $prefix");
foreach my $rpm (@{$pkg_tree{$prefix}{section}{$section}{rpms}}) {
- push @packages, "$done/$path/${prefix}_$rpm";
+ my $rpmpath = "$done/$path/${prefix}_$rpm";
+ if ($uploaded{$prefix}{$section}) {
+ # if already uploaded for mandatory arches, do not try to upload again src or noarch packages
+ # but still remember these duplicate files for removal
+ if (my ($type) = $rpm =~ /\.(noarch|src)\.rpm$/) {
+ plog('DEBUG', "$prefix already uploaded for mandatory arches, not re-uploading $type $rpm");
+ push @duplicate_packages, $rpmpath;
+ next;
+ }
+ }
+ push @packages, $rpmpath;
plog('OK', " uploading $rpm in $done/$path");
}
@@ -308,7 +318,7 @@ sub upload_prefix_in_section {
}
# delete the files which should have heen either put in queue or rejected
- unlink(@packages);
+ unlink(@packages, @duplicate_packages);
# unlink the sources rpm unless some non mandatory arch still need to be done
my $all_done = 1;