aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Emi.pm10
-rw-r--r--lib/Iurt/Queue.pm2
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm
index f35d0ec..97281ac 100644
--- a/lib/Iurt/Emi.pm
+++ b/lib/Iurt/Emi.pm
@@ -7,7 +7,6 @@ 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;
@@ -199,9 +198,8 @@ sub upload_prefix_in_media {
sub record_uploaded_packages {
my ($config, $pkg_tree, $prefix, $media) = @_;
my $done = "$config->{queue}/done";
-
- my $youri_file = "$prefix.youri";
my $path = $pkg_tree->{$prefix}{media}{$media}{path};
+
my %arches;
foreach my $pkg (@{$pkg_tree->{$prefix}{media}{$media}{rpms}}) {
my ($arch) = $pkg =~ /\.([^.]*)\.rpm$/;
@@ -209,5 +207,9 @@ sub record_uploaded_packages {
}
# Only keep 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);
+
+ foreach my $arch (keys %arches) {
+ touch("$done/$path/$prefix_$arch.uploaded");
+ }
+ touch("$done/$path/$prefix.upload");
}
diff --git a/lib/Iurt/Queue.pm b/lib/Iurt/Queue.pm
index 3930ca4..171ff97 100644
--- a/lib/Iurt/Queue.pm
+++ b/lib/Iurt/Queue.pm
@@ -238,6 +238,8 @@ sub get_upload_tree_state {
$pkg_tree{$prefix}{media}{$media}{failed_arch}{$arch} = 1;
} elsif ($result eq 'cancelled') {
$pkg_tree{$prefix}{media}{$media}{cancelled_arch}{$arch} = 1;
+ } elsif ($result eq 'uploaded') {
+ $pkg_tree{$prefix}{media}{$media}{uploaded_arch}{$arch} = 1;
} else {
plog('WARNING', "unknown state $arch.$result for $prefix");
}