summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-29 13:08:36 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-29 13:08:36 +0000
commit6a26fb5ff196c6fdcf93d636099607d9c6b900e8 (patch)
tree9d09dc98e2c493a21b85549308bfaea106b4b8cb /urpmq
parentf6c7d40924ba941dd18d85446ae980c56cf1367d (diff)
downloadurpmi-6a26fb5ff196c6fdcf93d636099607d9c6b900e8.tar
urpmi-6a26fb5ff196c6fdcf93d636099607d9c6b900e8.tar.gz
urpmi-6a26fb5ff196c6fdcf93d636099607d9c6b900e8.tar.bz2
urpmi-6a26fb5ff196c6fdcf93d636099607d9c6b900e8.tar.xz
urpmi-6a26fb5ff196c6fdcf93d636099607d9c6b900e8.zip
4.0-9mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq13
1 files changed, 11 insertions, 2 deletions
diff --git a/urpmq b/urpmq
index fbcc63f5..04a486ee 100755
--- a/urpmq
+++ b/urpmq
@@ -55,6 +55,7 @@ usage:
") . _(" --fuzzy - impose fuzzy search (same as -y).
") . _(" --list - list available packages.
") . _(" --list-media - list available media.
+") . _(" --list-nodes - list available nodes when using --parallel.
") . _(" --src - next package is a source package (same as -s).
") . _(" --headers - extract headers for package listed from urpmi db to
stdout (root only).
@@ -87,6 +88,7 @@ for (@ARGV) {
/^--fuzzy$/ and do { $query->{fuzzy} = 1; next };
/^--list$/ and do { $query->{list} = 1; next };
/^--list-media$/ and do { $query->{list_media} = 1; next };
+ /^--list-nodes$/ and do { $query->{list_nodes} = 1; next };
/^--src$/ and do { $query->{src} = 1; next };
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
@@ -152,8 +154,15 @@ $urpm->configure(nocheck_access => 1,
my $state = {};
my %requested;
-if ($query->{list_media}) {
- print join "\n", map { $_->{name} } @{$urpm->{media}};
+if ($query->{list_nodes}) {
+ foreach (keys %{$urpm->{parallel_handler}{nodes} || {}}) {
+ print "$_\n";
+ }
+ exit 0;
+} elsif ($query->{list_media}) {
+ foreach (@{$urpm->{media}}) {
+ print "$_->{name}\n";
+ }
exit 0;
} elsif ($query->{list}) {
#- if list has been activated, select all...