aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-06-22 13:51:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-06-22 13:51:53 +0000
commit61dcdce6ba83d727838861f4a4379865411f6f20 (patch)
tree0b2e4598cb8f0e368a6a8e07b2470141e70689b6
parent33e51dfbaf97dd6fe9b1e190c60c39b9de90a5c6 (diff)
downloadmga-youri-submit-61dcdce6ba83d727838861f4a4379865411f6f20.tar
mga-youri-submit-61dcdce6ba83d727838861f4a4379865411f6f20.tar.gz
mga-youri-submit-61dcdce6ba83d727838861f4a4379865411f6f20.tar.bz2
mga-youri-submit-61dcdce6ba83d727838861f4a4379865411f6f20.tar.xz
mga-youri-submit-61dcdce6ba83d727838861f4a4379865411f6f20.zip
ensure we don't do anything if nothing changed
-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");