diff options
author | Tim Retout <tim@retout.co.uk> | 2012-02-15 19:17:04 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-02-16 13:46:12 +0000 |
commit | 14e6a83cc53438a360656449c8c5da41d46f9d87 (patch) | |
tree | 200a49c439a88c62758685b84da5b72e6cb322e1 /solenv | |
parent | Turn on strictures in installer::sorter (diff) | |
download | core-14e6a83cc53438a360656449c8c5da41d46f9d87.tar.gz core-14e6a83cc53438a360656449c8c5da41d46f9d87.zip |
Remove unnecessary sorting subroutines.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/sorter.pm | 26 | ||||
-rw-r--r-- | solenv/bin/modules/installer/worker.pm | 20 |
2 files changed, 1 insertions, 45 deletions
diff --git a/solenv/bin/modules/installer/sorter.pm b/solenv/bin/modules/installer/sorter.pm index 4f3b9ebd2a77..b61bb5b32593 100644 --- a/solenv/bin/modules/installer/sorter.pm +++ b/solenv/bin/modules/installer/sorter.pm @@ -90,30 +90,4 @@ sub sort_array_of_hashes_numerically } } -######################################### -# Sorting an array of of strings -######################################### - -sub sorting_array_of_strings -{ - my ($arrayref) = @_; - - for ( my $i = 0; $i <= $#{$arrayref}; $i++ ) - { - my $onestringunder = ${$arrayref}[$i]; - - for ( my $j = $i + 1; $j <= $#{$arrayref}; $j++ ) - { - my $onestringover = ${$arrayref}[$j]; - - if ( $onestringunder gt $onestringover) - { - ${$arrayref}[$i] = $onestringover; - ${$arrayref}[$j] = $onestringunder; - $onestringunder = $onestringover; - } - } - } -} - 1; diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm index c91ece7108ab..445f1dceeab4 100644 --- a/solenv/bin/modules/installer/worker.pm +++ b/solenv/bin/modules/installer/worker.pm @@ -42,7 +42,6 @@ use installer::logger; use installer::pathanalyzer; use installer::scpzipfiles; use installer::scriptitems; -use installer::sorter; use installer::systemactions; use installer::windows::language; @@ -1533,23 +1532,6 @@ sub shift_file_to_end } ########################################################### -# Putting hash content into array and sorting it -########################################################### - -sub sort_hash -{ - my ( $hashref ) = @_; - - my $item = ""; - my @sortedarray = (); - - foreach $item (keys %{$hashref}) { push(@sortedarray, $item); } - installer::sorter::sorting_array_of_strings(\@sortedarray); - - return \@sortedarray; -} - -########################################################### # Renaming Windows files in Patch and creating file # patchfiles.txt ########################################################### @@ -1611,7 +1593,7 @@ sub prepare_windows_patchfiles my $patchlistfile = installer::existence::get_specified_file_by_name($filesref, $patchfilename); # reorganizing the patchfile content, sorting for directory to decrease the file size - my $sorteddirectorylist = sort_hash(\%patchfiledirectories); + my $sorteddirectorylist = [ sort keys %patchfiledirectories ]; my $patchfilelist = reorg_patchfile(\@patchfiles, $sorteddirectorylist); # shifting version.ini to the end of the list, to guarantee, that all files are patched |