diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-08 11:12:37 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-08 11:12:37 +0000 |
commit | a61523abb8b2349273dc97916a2737d63aa83a81 (patch) | |
tree | c4e977703090a0add2b0941e777a35204c624229 /urpm.pm | |
parent | 26b7eea498c9c7da53ceea261957e3544a69cac7 (diff) | |
download | urpmi-a61523abb8b2349273dc97916a2737d63aa83a81.tar urpmi-a61523abb8b2349273dc97916a2737d63aa83a81.tar.gz urpmi-a61523abb8b2349273dc97916a2737d63aa83a81.tar.bz2 urpmi-a61523abb8b2349273dc97916a2737d63aa83a81.tar.xz urpmi-a61523abb8b2349273dc97916a2737d63aa83a81.zip |
Fix addition of media with passwords
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -676,7 +676,8 @@ sub add_medium { } #- check whether a password is visible, if not, set clear_url. - $url =~ m|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)| or $medium->{clear_url} = $url; + my $has_password = $url =~ m|([^:]*://[^/:\@]*:)[^/:\@]*(\@.*)|; + $medium->{clear_url} = $url unless $has_password; $with_hdlist and $medium->{with_hdlist} = $with_hdlist; @@ -695,6 +696,11 @@ sub add_medium { $_->{name} eq $name and $_->{modified} = 1 foreach @{$urpm->{media}}; $urpm->{modified} = 1; } + if ($has_password) { + foreach (grep { $_->{name} eq $name } @{$urpm->{media}}) { + $_->{url} = $url; + } + } $name; } |