diff options
author | Francois Pons <fpons@mandriva.com> | 2002-01-23 16:59:10 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-01-23 16:59:10 +0000 |
commit | 00afd80efc7d380849d29c2a59259c1dc5e4b1b7 (patch) | |
tree | fc8c1d856442d8fd94828fdbec85f2560a8fdc84 /urpmi | |
parent | db5ea899c3f937208bfddfcf07da7c0d2b9c6b35 (diff) | |
download | urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.gz urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.bz2 urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.tar.xz urpmi-00afd80efc7d380849d29c2a59259c1dc5e4b1b7.zip |
3.2-3mdk
Diffstat (limited to 'urpmi')
-rwxr-xr-x | urpmi | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -24,7 +24,7 @@ import urpm _; #- default options. my $update = 0; -my $mediums = 0; +my $media = 0; my $auto = 0; my $allow_medium_change = 0; my $complete = 0; @@ -54,7 +54,7 @@ This is free software and may be redistributed under the terms of the GNU GPL. usage: ") . _(" --help - print this help message. ") . _(" --update - use only update media. -") . _(" --mediums - use only the medium listed by comma. +") . _(" --media - use only the media listed by comma. ") . _(" --auto - automatically select a good package in choices. ") . _(" --auto-select - automatically select packages for upgrading the system. ") . _(" --complete - use parsehdlist server to complete selection. @@ -78,7 +78,8 @@ my @nextargv; for (@ARGV) { /^--help$/ and do { usage; next }; /^--update$/ and do { $update = 1; next }; - /^--mediums$/ and do { push @nextargv, \$mediums; next }; + /^--media$/ and do { push @nextargv, \$media; next }; + /^--mediums$/ and do { push @nextargv, \$media; next }; /^--auto$/ and do { $auto = 1; next }; /^--allow-medium-change$/ and do { $allow_medium_change = 1; next }; /^--auto-select$/ and do { $auto_select = 1; next }; @@ -152,8 +153,14 @@ $sync and $urpm->{sync} = $sync; $verbose or $urpm->{log} = sub {}; $urpm->read_config; -$mediums and $urpm->select_media(split ',', $mediums); -foreach (grep { !$_->{ignore} && (!$update || $_->{update}) && (!$mediums || $_->{modified}) } @{$urpm->{media} || []}) { +if ($media) { + $urpm->select_media(split ',', $media); + foreach (grep { !$_->{modified} } @{$urpm->{media} || []}) { + #- this is only a local ignore that will not be saved. + $_->{ignore} = 1; + } +} +foreach (grep { !$_->{ignore} && (!$update || $_->{update}) } @{$urpm->{media} || []}) { $urpm->parse_synthesis($_); } |