From 2864278acd38b3b4bd5410c2022d21bf3154e933 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 17 Jan 2008 11:57:37 +0000 Subject: - urpmq: o add --provides --- urpmq | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'urpmq') diff --git a/urpmq b/urpmq index ae9c5db7..e874c055 100755 --- a/urpmq +++ b/urpmq @@ -77,6 +77,7 @@ usage: authentication (format is ). ") . N(" --env - use specific environment (typically a bug report). ") . N(" --changelog - print changelog. +") . N(" --provides - print provides. ") . N(" --sourcerpm - print sourcerpm. ") . N(" --summary, -S - print summary. ") . N(" --verbose, -v - verbose mode. @@ -440,6 +441,16 @@ if ($options{list_aliases}) { } } exit 0; + } elsif ($options{provides}) { + my @l = uniq_ { scalar $_->fullname } map { $urpm->{depslist}[$_] } map { split /\|/, $_ } keys %{$state->{selected}}; + foreach my $pkg (@l) { + if (@l > 1) { + printf "%s: %s\n", $pkg->name, $_ foreach $pkg->provides; + } else { + print "$_\n" foreach $pkg->provides; + } + } + exit 0; } } $urpmi_lock and $urpmi_lock->unlock; -- cgit v1.2.1