summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorTim Retout <tim@retout.co.uk>2012-09-26 21:10:13 +0100
committerTim Retout <tim@retout.co.uk>2012-09-26 21:45:56 +0100
commitcda8ac41f3aa34accac6a58df2c885595e8ce7ec (patch)
treef2cf83c2b2628eb6189e9d1f8713c0aa59d3da30 /solenv/bin
parentbc9ad85ca4a70e5b14abe79ea59e848ee3b21e23 (diff)
installer: Replace installer::worker::shuffle_array
Change-Id: I2da961affa4bcb8349d8a038bc77986f5209a55d
Diffstat (limited to 'solenv/bin')
-rw-r--r--solenv/bin/modules/installer.pm3
-rw-r--r--solenv/bin/modules/installer/worker.pm16
2 files changed, 2 insertions, 17 deletions
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 49e2e3c6b2ab..2c2ef2295cbd 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -32,6 +32,7 @@ use base 'Exporter';
use Cwd;
use Data::Dumper;
use File::Copy;
+use List::Util qw(shuffle);
use installer::archivefiles;
use installer::control;
use installer::converter;
@@ -1057,7 +1058,7 @@ sub run {
}
# shuffle array to reduce parallel packaging process in pool
- installer::worker::shuffle_array($packages)
+ @{$packages} = shuffle @{$packages}
unless $installer::globals::simple;
# iterating over all packages
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index e954971a3de8..4912b4ac4022 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -1562,22 +1562,6 @@ sub tar_package
return $filesize;
}
-#########################################################
-# Shuffle an array (Fisher Yates shuffle)
-#########################################################
-
-sub shuffle_array
-{
- my ( $arrayref ) = @_;
-
- my $i = @$arrayref;
- while (--$i)
- {
- my $j = int rand ($i+1);
- @$arrayref[$i,$j] = @$arrayref[$j,$i];
- }
-}
-
################################################
# Defining the English license text to add
# it into Solaris packages.