summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-01-14 12:51:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-01-14 12:51:12 +0000
commit86db34b5ca136bdf83ae1658e46e29305d06d151 (patch)
tree15380375f6067e3938f79878fc8562341ebe4c1d /urpmq
parent12b0564ab9ae782dbf5743eb5f5376a60f1f39ba (diff)
downloadurpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.gz
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.bz2
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.xz
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.zip
- urpmq:
o add --sourcerpm
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq16
1 files changed, 11 insertions, 5 deletions
diff --git a/urpmq b/urpmq
index d6f4e52d..df9c3462 100755
--- a/urpmq
+++ b/urpmq
@@ -77,6 +77,7 @@ usage:
authentication (format is <user:password>).
") . 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) {