diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-11-16 22:31:20 -0600 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-11-16 22:31:20 -0600 |
commit | e8a9f128a5d3fcc0fd5e8e0ce834d872e198a8fe (patch) | |
tree | df4feb3dca4fa4195acced0efc7067c718477402 /SBO-Lib/lib/SBO/Lib.pm | |
parent | c63a84d8ffc8552a13cc02d12da25732f4f3efdf (diff) | |
download | sbotools2-e8a9f128a5d3fcc0fd5e8e0ce834d872e198a8fe.tar.xz |
switch back to using push instead of unshift in add_to_queue/get_build_queue since arrays have more extra room at end than beginning
Diffstat (limited to 'SBO-Lib/lib/SBO/Lib.pm')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index eae87a0..ab3cf2c 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -722,7 +722,8 @@ sub add_to_queue ($) { my $args = shift; my $sbo = \${$args}{NAME}; return unless $$sbo; - unshift @$args{QUEUE}, $$sbo; + push @$args{QUEUE}, $$sbo; +# unshift @$args{QUEUE}, $$sbo; my $location = get_sbo_location ($$sbo); return unless $location; my $requires = get_from_info (LOCATION => $location, GET => 'REQUIRES'); @@ -752,7 +753,7 @@ sub get_build_queue { } # Remove duplicate entries (leaving first occurrence) my (%seen, @build_queue); - FIRST: for my $sb (@$temp_queue) { + FIRST: for my $sb (reverse @$temp_queue) { next FIRST if $seen{$sb}++; push @build_queue, $sb; } |