From 86db34b5ca136bdf83ae1658e46e29305d06d151 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 14 Jan 2008 12:51:12 +0000 Subject: - urpmq: o add --sourcerpm --- urpmq | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'urpmq') diff --git a/urpmq b/urpmq index d6f4e52d..df9c3462 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(" --sourcerpm - print sourcerpm. ") . N(" --summary, -S - print summary. ") . N(" --verbose, -v - verbose mode. ") . N(" --requires-recursive, -d @@ -312,15 +313,17 @@ if ($options{list_aliases}) { $state->{selected} = \%requested; } - if ($options{sources} - || $options{info} - || $options{files} - || $options{changelog}) + my %need_xml_info; + $need_xml_info{info} = 1 if $options{info} || $options{sourcerpm}; + $need_xml_info{files} = 1 if $options{files}; + $need_xml_info{changelog} = 1 if $options{changelog}; + + if ($options{sources} || %need_xml_info) { my ($local_sources, $list) = urpm::get_pkgs::selected2list($urpm, $state->{selected}); my %xml_info_pkgs; - if ($options{info} || $options{files} || $options{changelog}) { + if (%need_xml_info) { # get descriptions of update sources my $updates_descr = urpm::get_updates_description($urpm); @@ -405,6 +408,9 @@ if ($options{list_aliases}) { print join("\n", $pkg->files) . "\n"; } } + if (my @tags = grep { $options{$_} } 'sourcerpm') { + print $pkg->name, ': ', $pkg->$_, "\n" foreach @tags; + } if ($options{changelog}) { if (my @changelogs = $pkg->changelogs) { foreach (@changelogs) { -- cgit v1.2.1