summaryrefslogtreecommitdiffstats
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
parent12b0564ab9ae782dbf5743eb5f5376a60f1f39ba (diff)
downloadurpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.gz
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.bz2
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.tar.xz
urpmi-86db34b5ca136bdf83ae1658e46e29305d06d151.zip
- urpmq:
o add --sourcerpm
-rw-r--r--NEWS2
-rw-r--r--pod/urpmq.8.pod4
-rw-r--r--urpm/args.pm1
-rw-r--r--urpmi.bash-completion2
-rwxr-xr-xurpmq16
5 files changed, 19 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index e651f10f..40aacba2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
- urpmf:
o fix --license
+- urpmq:
+ o add --sourcerpm
Version 5.0 - 11 January 2008, by Pascal "Pixel" Rigaux
diff --git a/pod/urpmq.8.pod b/pod/urpmq.8.pod
index a297b3c2..7777a341 100644
--- a/pod/urpmq.8.pod
+++ b/pod/urpmq.8.pod
@@ -199,6 +199,10 @@ If the urpmi or rpm db is busy, wait until it is available
Prints the package changelog.
+=item B<--sourcerpm>
+
+Prints the sourcerpm of the package
+
=item B<--summary>
Prints concise information about the package.
diff --git a/urpm/args.pm b/urpm/args.pm
index 0181a544..56b744f2 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -230,6 +230,7 @@ my %options_spec = (
keep => \$options{keep},
list => \$options{list},
changelog => \$options{changelog},
+ sourcerpm => \$options{sourcerpm},
'summary|S' => \$options{summary},
'list-media:s' => sub { $options{list_media} = $_[1] || 'all' },
'list-url' => \$options{list_url},
diff --git a/urpmi.bash-completion b/urpmi.bash-completion
index 667a9637..1f45a759 100644
--- a/urpmi.bash-completion
+++ b/urpmi.bash-completion
@@ -176,7 +176,7 @@ _urpmq()
-r -f -l --update --media --excludemedia \
--sortmedia --synthesis --auto-select --fuzzy --keep --nokeep \
--list --list-url --list-media --list-nodes --list-aliases \
- --src --sources --force --parallel --wget --curl --prozilla \
+ --src --sources --summary --sourcerpm --force --parallel --wget --curl --prozilla \
--changelog --proxy --proxy-user --env --dump-config \
--whatprovides --whatrequires --whatrequires-recursive \
--skip --prefer \
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) {