aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Emi.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm
index 851307c..6a8ea8e 100644
--- a/lib/Iurt/Emi.pm
+++ b/lib/Iurt/Emi.pm
@@ -7,6 +7,7 @@ use Iurt::Mail qw(sendmail);
use Iurt::Queue qw(check_if_all_archs_processed);
use Iurt::Util qw(plog);
use MDK::Common::Func qw(find);
+use MDK::Common::File qw(append_to_file);
use MDK::Common::DataStructure qw(difference2);
use strict;
@@ -159,6 +160,14 @@ sub upload_prefix_in_media {
plog('DEBUG', "running $command");
if (!system($command)) {
plog('INFO', "upload succeeded");
+ my %arches;
+ foreach my $pkg (@packages) {
+ my ($arch) = $pkg =~ /\.([^.]*)\.rpm$/;
+ $arches{$arch} = 1 unless $arch eq 'src';
+ }
+ # Only kee noarch if it's the only architecture
+ delete $arches{'noarch'} if 1 < keys %arches;
+ append_to_file("$done/$path/$prefix.upload", map {"$_\n"} keys %arches);
} else {
# should send a mail or something
plog('ERROR', "upload failed ($!), rejecting files in $reject$path/");