diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-10-14 13:44:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-10-14 13:44:33 +0000 |
commit | d6a209622740f7568bb80bce826d3ec34bdf3954 (patch) | |
tree | f22597674b358df140a1224b21b1d166b595662e /urpm/media.pm | |
parent | 54ed4e4161c0838da939057e5b286e93f2423dfb (diff) | |
download | urpmi-d6a209622740f7568bb80bce826d3ec34bdf3954.tar urpmi-d6a209622740f7568bb80bce826d3ec34bdf3954.tar.gz urpmi-d6a209622740f7568bb80bce826d3ec34bdf3954.tar.bz2 urpmi-d6a209622740f7568bb80bce826d3ec34bdf3954.tar.xz urpmi-d6a209622740f7568bb80bce826d3ec34bdf3954.zip |
- urpmi.update, urpmi.addmedia, urpmi.removemedia:
o do not check wether the media are valid,
it allows "mv /etc/urpmi/urpmi.cfg.{backup,} ; urpmi.update -a" to work
(nb: not equivalent with urpmi.addmedia, since pubkey will not be imported)
Diffstat (limited to 'urpm/media.pm')
-rw-r--r-- | urpm/media.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm index c8c3428b..e0e3ca5a 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -155,7 +155,7 @@ sub recover_url_from_list { #- Loads /etc/urpmi/urpmi.cfg and performs basic checks. #- Does not handle old format: <name> <url> [with <path_hdlist>] sub read_config { - my ($urpm) = @_; + my ($urpm, $nocheck) = @_; return if $urpm->{media}; #- media already loaded $urpm->{media} = []; my $config = urpm::cfg::load_config($urpm->{config}) @@ -189,7 +189,7 @@ sub read_config { } } - add_existing_medium($urpm, $_) foreach @media; + add_existing_medium($urpm, $_, $nocheck) foreach @media; eval { require urpm::ldap; urpm::ldap::load_ldap_media($urpm) }; } @@ -234,7 +234,7 @@ sub _migrate__with_synthesis { #- probe medium to be used, take old medium into account too. sub add_existing_medium { - my ($urpm, $medium) = @_; + my ($urpm, $medium, $nocheck) = @_; if (name2medium($urpm, $medium->{name})) { $urpm->{error}(N("trying to override existing medium \"%s\", skipping", $medium->{name})); @@ -246,7 +246,7 @@ sub add_existing_medium { $urpm->{modified} = 1; } - check_existing_medium($urpm, $medium); + check_existing_medium($urpm, $medium) if !$nocheck; _migrate_removable_device($urpm, $medium); @@ -586,7 +586,7 @@ sub configure { $urpm->{media} = []; add_distrib_media($urpm, "Virtual", $options{usedistrib}, %options, virtual => 1, on_the_fly => 1); } else { - read_config($urpm); + read_config($urpm, ''); if (!$options{media} && $urpm->{options}{'default-media'}) { $options{media} = $urpm->{options}{'default-media'}; } |