diff options
author | j pipkin <j@dawnrazor.net> | 2013-09-20 22:24:04 -0500 |
---|---|---|
committer | j pipkin <j@dawnrazor.net> | 2013-09-20 22:24:04 -0500 |
commit | 91a2e19799bdb10a37b9b48d943f00cd87b71ba9 (patch) | |
tree | 5d190292704834b50ab9daa2b89b893b4c36fb58 | |
parent | 7cbfb8f6aa04b0c6a6c6967c28fc514e164f251b (diff) | |
download | sbotools2-91a2e19799bdb10a37b9b48d943f00cd87b71ba9.tar.xz |
collapse two consecutive "unless ($force) {" sections into one, get rid of globally-unused %updates
-rwxr-xr-x | sboupgrade | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -140,15 +140,12 @@ if ($install_new) { my $upgrade_queue; -# doesn't matter what's updatable and what's not if force is specified -my %updates unless $force; -unless ($force) { - my $updates = get_available_updates; - $updates{$$_{name}} = 1 for @$updates; -} - +# doesn't matter what's updatable and what's not if force is specified, # but without force, we only want to update what there are updates for unless ($force) { + my %updates; + my $updates = get_available_updates; + $updates{$$_{name}} = 1 for @$updates; for my $sbo (@sbos) { push @$upgrade_queue, $sbo if $updates{$sbo}; } |