aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-11-24 00:41:30 +0000
committerPascal Terjan <pterjan@gmail.com>2016-11-24 00:41:30 +0000
commit3b7176ba99a3fe6452f267d460b1c7c13149cbce (patch)
treedc7c810fd43cdf2906a54784654eb81523881c8c /lib/Iurt
parent2328f608ff92c8efad17fbc36e0bbcb50376ef21 (diff)
downloadiurt-3b7176ba99a3fe6452f267d460b1c7c13149cbce.tar
iurt-3b7176ba99a3fe6452f267d460b1c7c13149cbce.tar.gz
iurt-3b7176ba99a3fe6452f267d460b1c7c13149cbce.tar.bz2
iurt-3b7176ba99a3fe6452f267d460b1c7c13149cbce.tar.xz
iurt-3b7176ba99a3fe6452f267d460b1c7c13149cbce.zip
Use check_if_all_archs_processed in emi too, it handles more cases
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/Emi.pm14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm
index 9e98125..b0e5597 100644
--- a/lib/Iurt/Emi.pm
+++ b/lib/Iurt/Emi.pm
@@ -4,6 +4,7 @@ use base qw(Exporter);
use File::Path qw(make_path);
use Iurt::Config qw(get_author_email get_mandatory_arch);
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::DataStructure qw(difference2);
@@ -174,18 +175,7 @@ sub upload_prefix_in_media {
unlink(@packages, @duplicate_packages);
# unlink the sources rpm unless some non mandatory arch still need to be done
- my $all_done = 1;
- if (!defined($pkg_tree->{$prefix}{media}{$media}{arch}{noarch})) {
- my $arch_list = find { ref($_) eq 'ARRAY' } $config->{arch}, (ref($config->{arch}) eq 'HASH' ? ($config->{arch}{$target}, $config->{arch}{default}) : ());
- my @arch_list = $arch_list ? @$arch_list : keys %{$config->{bot}};
- # If we are here, mandatory arches are done, no need to check them
- my $mandatory_arch = get_mandatory_arch($config, $target);
- foreach my $arch (difference2(\@arch_list, $mandatory_arch)) {
- next if $pkg_tree->{$prefix}{media}{$media}{done_arch}{$arch};
- $all_done = 0;
- }
- }
- if ($all_done) {
+ if (check_if_all_archs_processed($media, $prefix, $pkg_tree->{$prefix}, $config)) {
foreach (@{$pkg_tree->{$prefix}{srpms}}) {
plog('DEBUG', "unlink $todo$path/${prefix}_$_");
unlink("$todo$path/${prefix}_$_");