diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/ldap.pm | 4 | ||||
-rw-r--r-- | urpm/media.pm | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/urpm/ldap.pm b/urpm/ldap.pm index 9a997fef..a2ab1e56 100644 --- a/urpm/ldap.pm +++ b/urpm/ldap.pm @@ -103,7 +103,7 @@ sub read_ldap_cache { ! -f $_ and next; my %medium = get_vars_from_sh($_); next if !check_ldap_medium(\%medium); - urpm::media::add_existing_medium($urpm, \%medium); + urpm::media::add_existing_medium($urpm, \%medium, 'nocheck'); } } @@ -204,7 +204,7 @@ sub load_ldap_media { $medium->{name} = "ldap_" . $medium->{name}; $medium->{ldap} = 1; next if !check_ldap_medium($medium); - urpm::media::add_existing_medium($urpm, $medium); + urpm::media::add_existing_medium($urpm, $medium, 'nocheck'); write_ldap_cache($urpm,$medium); } }; 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'}; } |