From 24e3c1e07445f6e424526776025ac120aa03b4c0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 27 Nov 2006 09:31:07 +0000 Subject: simplify --- urpm/install.pm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'urpm/install.pm') diff --git a/urpm/install.pm b/urpm/install.pm index b01ed034..e78f80a9 100644 --- a/urpm/install.pm +++ b/urpm/install.pm @@ -100,7 +100,6 @@ sub install_logger { #- excludedocs, nosize, noscripts, oldpackage, repackage, ignorearch sub install { my ($urpm, $remove, $install, $upgrade, %options) = @_; - my %readmes; $options{translate_message} = 1; my $db = urpm::db_open_or_die($urpm, $urpm->{root}, !$options{test}); #- open in read/write mode unless testing installation. @@ -150,6 +149,7 @@ sub install { if (!$options{nodeps} && (@l = $trans->check(%options))) { } elsif (!$options{noorder} && (@l = $trans->order)) { } else { + my %readmes; my $fh; #- assume default value for some parameter. $options{delta} ||= 1000; @@ -181,16 +181,17 @@ sub install { unlink "$urpm->{cachedir}/rpms/" . $pkg->filename; } } - } - unlink @produced_deltas; - if ($::verbose >= 0) { - foreach (keys %readmes) { - print "-" x 70, "\n", N("More information on package %s", $readmes{$_}), "\n"; - print cat_($_); - print "-" x 70, "\n"; + if ($::verbose >= 0) { + foreach (keys %readmes) { + print "-" x 70, "\n", N("More information on package %s", $readmes{$_}), "\n"; + print cat_($_); + print "-" x 70, "\n"; + } } } + unlink @produced_deltas; + @l; } -- cgit v1.2.1