summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-23 16:59:10 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-23 16:59:10 +0000
commit00afd80efc7d380849d29c2a59259c1dc5e4b1b7 (patch)
treefc8c1d856442d8fd94828fdbec85f2560a8fdc84 /urpmq
parentdb5ea899c3f937208bfddfcf07da7c0d2b9c6b35 (diff)
downloadurpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar
urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.gz
urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.bz2
urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.xz
urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.zip
3.2-3mdk
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq15
1 files changed, 11 insertions, 4 deletions
diff --git a/urpmq b/urpmq
index 4c03f641..7973c5be 100755
--- a/urpmq
+++ b/urpmq
@@ -46,7 +46,7 @@ usage:
") . _(" -r - print version and release too with name.
") . _(" -f - print version, release and arch with name.
") . "\n" . _(" --update - use only update media.
-") . _(" --mediums - use only the medium listed by comma.
+") . _(" --media - use only the media listed by comma.
") . _(" --auto-select - automatically select packages for upgrading the system.
") . _(" --headers - extract headers for package listed from urpmi db to
stdout (root only).
@@ -62,7 +62,8 @@ my @nextargv;
for (@ARGV) {
/^--help$/ and do { usage; next };
/^--update$/ and do { $query->{update} = 1; next };
- /^--mediums$/ and do { push @nextargv, \$query->{mediums}; next };
+ /^--media$/ and do { push @nextargv, \$query->{media}; next };
+ /^--mediums$/ and do { push @nextargv, \$query->{media}; next };
/^--auto-select$/ and do { $query->{auto_select} = 1; next };
/^--headers$/ and do { $query->{headers} = 1; next };
/^--sources$/ and do { $query->{sources} = 1; next };
@@ -94,8 +95,14 @@ my $urpm = new urpm;
$query->{verbose} or $urpm->{log} = sub {};
$urpm->read_config(nocheck_access => 1);
-$query->{mediums} and $urpm->select_media(split ',', $query->{mediums});
-foreach (grep { !$_->{ignore} && (!$query->{update} || $_->{update}) && (!$query->{mediums} || $_->{modified}) } @{$urpm->{media} || []}) {
+if ($query->{media}) {
+ $urpm->select_media(split ',', $query->{media});
+ foreach (grep { !$_->{modified} } @{$urpm->{media} || []}) {
+ #- this is only a local ignore that will not be saved.
+ $_->{ignore} = 1;
+ }
+}
+foreach (grep { !$_->{ignore} && (!$query->{update} || $_->{update}) } @{$urpm->{media} || []}) {
$urpm->parse_synthesis($_);
}