diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-17 15:56:14 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-17 15:56:14 +0000 |
commit | 7aed6d9fd78cd074e45e6a13842143358c3c86ab (patch) | |
tree | ba19fa9a597d72a4d6546b09088329006e7aa207 /urpm.pm | |
parent | 83c438d4fca135b53543152c28339582d53ab063 (diff) | |
download | urpmi-7aed6d9fd78cd074e45e6a13842143358c3c86ab.tar urpmi-7aed6d9fd78cd074e45e6a13842143358c3c86ab.tar.gz urpmi-7aed6d9fd78cd074e45e6a13842143358c3c86ab.tar.bz2 urpmi-7aed6d9fd78cd074e45e6a13842143358c3c86ab.tar.xz urpmi-7aed6d9fd78cd074e45e6a13842143358c3c86ab.zip |
Fix bug #13644, urpmi.addmedia --distrib was broken due to misc's patches.
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -682,13 +682,13 @@ sub add_medium { $urpm->{log}(N("added medium %s", $name)); #- we need to reload the config, since some string substitutions may have occured - $urpm->write_config; - delete $urpm->{media}; - $urpm->read_config(nocheck_access => 1); - foreach (@{$urpm->{media}}) { - $_->{name} eq $name and $_->{modified} = 1; + unless ($options{no_reload_config}) { + $urpm->write_config; + delete $urpm->{media}; + $urpm->read_config(nocheck_access => 1); + $_->{name} eq $name and $_->{modified} = 1 foreach @{$urpm->{media}}; + $urpm->{modified} = 1; } - $urpm->{modified} = 1; $name; } @@ -755,7 +755,7 @@ sub add_distrib_media { } } - #- cosmetic update of name if it contains blank char. + #- cosmetic update of name if it contains spaces. $name =~ /\s/ and $name .= ' '; my @newnames; @@ -779,6 +779,7 @@ sub add_distrib_media { "$url/$rpmsdir", offset_pathname($url, $rpmsdir) . "/$distrib_root/" . ($options{probe_with} eq 'synthesis' ? 'synthesis.' : '') . $hdlist, index_name => $name ? undef : 0, + no_reload_config => 1, #- no need to reload config each time, since we don't update the media %options, ); |