aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Youri/Submit/Post/CleanRpmsrate.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Youri/Submit/Post/CleanRpmsrate.pm b/lib/Youri/Submit/Post/CleanRpmsrate.pm
index 2b75ce4..977e2a0 100644
--- a/lib/Youri/Submit/Post/CleanRpmsrate.pm
+++ b/lib/Youri/Submit/Post/CleanRpmsrate.pm
@@ -26,7 +26,12 @@ sub run {
my ($self, $repository, $target, $define) = @_;
croak "Not a class method" unless ref $self;
my $root = $repository->get_install_root();
- foreach my $arch (uniq(@{$repository->get_arch_changed($target)}, 'i586', 'x86_64')) {
+ my @changed = @{$repository->get_arch_changed($target)};
+ if (grep { $_ eq 'i586' } @changed) {
+ # x86_64 uses i586 pkgs, so rpmsrate need to be rebuild
+ @changed = uniq(@changed, 'x86_64');
+ }
+ foreach my $arch (@changed) {
my $rpmsrate = "$root/$target/$arch/media/media_info/rpmsrate";
my @media = "$root/$target/$arch/media/main/release";
system("cp", "$rpmsrate-raw", "$rpmsrate-new");