summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-28 14:38:35 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-28 14:38:35 +0000
commit50daeca06b381768cd0548b3432b99a073fba3be (patch)
tree74530388ea0f7e3f18939d1bea94de4e7c156212 /urpmq
parent37a99f9286197bfcb661f9b38d7433fa08fd2481 (diff)
downloadurpmi-50daeca06b381768cd0548b3432b99a073fba3be.tar
urpmi-50daeca06b381768cd0548b3432b99a073fba3be.tar.gz
urpmi-50daeca06b381768cd0548b3432b99a073fba3be.tar.bz2
urpmi-50daeca06b381768cd0548b3432b99a073fba3be.tar.xz
urpmi-50daeca06b381768cd0548b3432b99a073fba3be.zip
4.0-7mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq9
1 files changed, 7 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index 386b3642..8f18b993 100755
--- a/urpmq
+++ b/urpmq
@@ -54,6 +54,7 @@ usage:
") . _(" --auto-select - automatically select packages to upgrade the system.
") . _(" --fuzzy - impose fuzzy search (same as -y).
") . _(" --list - list available packages.
+") . _(" --list-media - list available media.
") . _(" --src - next package is a source package (same as -s).
") . _(" --headers - extract headers for package listed from urpmi db to
stdout (root only).
@@ -84,6 +85,7 @@ for (@ARGV) {
/^--auto-select$/ and do { $query->{deps} = $query->{upgrade} = $query->{auto_select} = 1; next };
/^--fuzzy$/ and do { $query->{fuzzy} = 1; next };
/^--list$/ and do { $query->{list} = 1; next };
+ /^--list-media$/ and do { $query->{list_media} = 1; next };
/^--src$/ and do { $query->{src} = 1; next };
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
@@ -146,8 +148,11 @@ $urpm->configure(nocheck_access => 1,
my $state = {};
my %requested;
-#- if list has been activated, select all...
-if ($query->{list}) {
+if ($query->{list_media}) {
+ print join "\n", map { $_->{name} } @{$urpm->{media}};
+ exit 0;
+} elsif ($query->{list}) {
+ #- if list has been activated, select all...
@{$state->{selected}}{0 .. $#{$urpm->{depslist}}} = ();
} else {
%requested = $urpm->register_rpms(@files);