From 718ce6f49d1f83f25f1b59daa566dc7fb98f4643 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 4 Dec 2006 15:38:42 +0000 Subject: display all found packages (when there is a choice, only the first was displayed) --- urpmi | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'urpmi') diff --git a/urpmi b/urpmi index 30cbad7d..9e1d998c 100755 --- a/urpmi +++ b/urpmi @@ -113,6 +113,7 @@ usage: dependencies checking and integrity. ") . N(" --parallel - distributed urpmi across machines of alias. ") . N(" --root - use another root for rpm installation. +") . N(" --urpmi-root - use another root for urpmi db & rpm installation. ") . N(" --use-distrib - configure urpmi on the fly from a distrib tree, useful to install a chroot with --root option. ") . N(" --probe-synthesis - use synthesis file. @@ -151,8 +152,8 @@ usage: ") . N(" -a - select all matches on command line. ") . N(" -p - allow search in provides to find package. ") . N(" -P - do not search in provides to find package. -") . N(" -q - quiet mode. -") . N(" -v - verbose mode. +") . N(" --quiet, -q - quiet mode. +") . N(" --verbose, -v - verbose mode. ") . "\n" . N(" names or rpm files given on command line will be installed. "); exit(0); @@ -413,7 +414,8 @@ if (@names) { ) || $force or exit 1; if (%requested) { - $urpm->{log}("found package(s): " . join(" ", map { scalar $urpm->{depslist}[$_]->fullname } keys %requested)); + $urpm->{log}("found package(s): " . join(" ", map { scalar $urpm->{depslist}[$_]->fullname } + map { split /\|/ } keys %requested)); } } if (@src_names) { @@ -632,7 +634,7 @@ foreach my $set (@{$state->{transaction} || []}) { my (@transaction_list, %transaction_sources); #- put a blank line to separate with previous transaction or user question. - print "\n"; + print "\n" if $verbose >= 0; #- prepare transaction... urpm::install::prepare_transaction($urpm, $set, $list, \%sources, \@transaction_list, \%transaction_sources); @@ -711,13 +713,15 @@ foreach my $set (@{$state->{transaction} || []}) { excludepath => $urpm->{options}{excludepath}, excludedocs => $urpm->{options}{excludedocs}, ); } else { - my @packnames = (values %transaction_sources_install, values %transaction_sources); - (my $common_prefix) = $packnames[0] =~ m!^(.*)/!; - if (length($common_prefix) && @packnames == grep { m!^\Q$common_prefix/! } @packnames) { - #- there's a common prefix, simplify message - print N("installing %s from %s", join(' ', map { s!.*/!!; $_ } @packnames), $common_prefix), "\n"; - } else { - print N("installing %s", join "\n", @packnames), "\n"; + if ($verbose >= 0) { + my @packnames = (values %transaction_sources_install, values %transaction_sources); + (my $common_prefix) = $packnames[0] =~ m!^(.*)/!; + if (length($common_prefix) && @packnames == grep { m!^\Q$common_prefix/! } @packnames) { + #- there's a common prefix, simplify message + print N("installing %s from %s", join(' ', map { s!.*/!!; $_ } @packnames), $common_prefix), "\n"; + } else { + print N("installing %s", join "\n", @packnames), "\n"; + } } my $to_remove = $urpm->{options}{'allow-force'} ? [] : $set->{remove} || []; @$to_remove and print N("removing %s", "@$to_remove"), "\n"; -- cgit v1.2.1