summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-29 10:20:55 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-29 10:20:55 +0000
commitab2dacf9ef8a8098d398a922205c24904925fa52 (patch)
treeef774e3f940761e07b1cc47c634b4a343926b166 /urpm
parent1265cac8b93cfcdcaa337504eb57bdaf752a56d2 (diff)
downloadurpmi-ab2dacf9ef8a8098d398a922205c24904925fa52.tar
urpmi-ab2dacf9ef8a8098d398a922205c24904925fa52.tar.gz
urpmi-ab2dacf9ef8a8098d398a922205c24904925fa52.tar.bz2
urpmi-ab2dacf9ef8a8098d398a922205c24904925fa52.tar.xz
urpmi-ab2dacf9ef8a8098d398a922205c24904925fa52.zip
fix --mirrorlist broken by _migrate_removable_device
Diffstat (limited to 'urpm')
-rw-r--r--urpm/media.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 4c20f0be..85ec6b04 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -392,6 +392,8 @@ sub remove_user_media_info_files {
sub _migrate_removable_device {
my ($urpm, $medium) = @_;
+ $medium->{url} or return;
+
# always drop {removable}, it is obsolete
# (nb: for iso files, {removable} has already been renamed into {iso} internally)
delete $medium->{removable};
@@ -407,7 +409,7 @@ sub _migrate_removable_device {
sub _migrate_removable_url {
my ($url) = @_;
- if ($url && $url =~ /^removable/) {
+ if ($url =~ /^removable/) {
$url =~ s!^removable(.*?)://!/!;
if ($url =~ s!/(mnt|media)/cd\w+/?!cdrom://!i) {
# success!