aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-06-21 10:13:15 +0000
committerOlivier Blin <oblin@mandriva.com>2007-06-21 10:13:15 +0000
commit9cdad319e71f5332bbf16044f2a5f08e478fccb1 (patch)
tree7301cbdb2b4e562e0a2fc68436f633521b055422
parent488e4f461bae998e281cf1644a28743d8e5dd717 (diff)
downloadmga-youri-submit-9cdad319e71f5332bbf16044f2a5f08e478fccb1.tar
mga-youri-submit-9cdad319e71f5332bbf16044f2a5f08e478fccb1.tar.gz
mga-youri-submit-9cdad319e71f5332bbf16044f2a5f08e478fccb1.tar.bz2
mga-youri-submit-9cdad319e71f5332bbf16044f2a5f08e478fccb1.tar.xz
mga-youri-submit-9cdad319e71f5332bbf16044f2a5f08e478fccb1.zip
uniquify arch list
-rw-r--r--lib/Youri/Submit/Post/CleanRpmsrate.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Youri/Submit/Post/CleanRpmsrate.pm b/lib/Youri/Submit/Post/CleanRpmsrate.pm
index ee11553..2b75ce4 100644
--- a/lib/Youri/Submit/Post/CleanRpmsrate.pm
+++ b/lib/Youri/Submit/Post/CleanRpmsrate.pm
@@ -16,6 +16,9 @@ use strict;
use Carp;
use base qw/Youri::Submit::Post/;
+#- inlined from MDK::Common::DataStructure
+sub uniq { my %l; $l{$_} = 1 foreach @_; grep { delete $l{$_} } @_ }
+
sub _init {
}
@@ -23,7 +26,7 @@ sub run {
my ($self, $repository, $target, $define) = @_;
croak "Not a class method" unless ref $self;
my $root = $repository->get_install_root();
- foreach my $arch (@{$repository->get_arch_changed($target)}, 'i586', 'x86_64') {
+ foreach my $arch (uniq(@{$repository->get_arch_changed($target)}, 'i586', 'x86_64')) {
my $rpmsrate = "$root/$target/$arch/media/media_info/rpmsrate";
my @media = "$root/$target/$arch/media/main/release";
system("cp", "$rpmsrate-raw", "$rpmsrate-new");