summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-03-14 10:53:50 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-03-14 10:53:50 +0000
commit78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f (patch)
tree40af128cf9ff8961c8d426626f5511d612307821
parentf23b5291971b786ed3173aed611008247e26525e (diff)
downloadurpmi-78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f.tar
urpmi-78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f.tar.gz
urpmi-78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f.tar.bz2
urpmi-78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f.tar.xz
urpmi-78e0695c7fbb60fa5be32bb77c8fbf2fd0e6803f.zip
Add a --summary option to urpmq.
Patch by Michael Scherer, slightly reworked (bug 14513)
-rw-r--r--urpm/args.pm1
-rwxr-xr-xurpmq7
2 files changed, 7 insertions, 1 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 84c62cfe..ffd1c426 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -190,6 +190,7 @@ my %options_spec = (
keep => \$options{keep},
list => \$options{list},
changelog => \$options{changelog},
+ summary => \$options{summary},
'list-media:s' => sub { $options{list_media} = $_[1] || 'all' },
'list-url' => \$options{list_url},
'list-nodes' => \$options{list_nodes},
diff --git a/urpmq b/urpmq
index 59d3147e..14db4dc7 100755
--- a/urpmq
+++ b/urpmq
@@ -294,6 +294,7 @@ if ($urpm::args::options{list_aliases}) {
if ($urpm::args::options{headers}
|| $urpm::args::options{sources}
|| $urpm::args::options{info}
+ || $urpm::args::options{summary}
|| $urpm::args::options{list_files}
|| $urpm::args::options{changelog})
{
@@ -327,7 +328,8 @@ if ($urpm::args::options{list_aliases}) {
system "rpm2header", values %downloads;
}
}
- } elsif ($urpm::args::options{info} || $urpm::args::options{list_files} || $urpm::args::options{changelog}) {
+ } elsif ($urpm::args::options{info} || $urpm::args::options{list_files} || $urpm::args::options{changelog}
+ || $urpm::args::options{summary}) {
my %downloads;
# get descriptions of update sources
my $updates_descr = $urpm->urpm::get_updates_description;
@@ -400,6 +402,9 @@ if ($urpm::args::options{list_aliases}) {
and print from_utf8(sprintf("%-20s:\n%s\n", "Reason for update", $updesc->{pre}));
}
}
+ if ($urpm::args::options{summary}) {
+ printf "%s : %s ( %s%s-%s )\n", $pkg->name, $pkg->summary, ($pkg->epoch ? $pkg->epoch . ':' : ''), $pkg->version, $pkg->release;
+ }
if ($urpm::args::options{list_files}) {
if ($pkg->files) {
print join("\n", $pkg->files)."\n";