summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-02-27 17:37:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-02-27 17:37:37 +0000
commit6ad8276603af8eaba9f53a821bda3ae19cfdd76f (patch)
treebc59987ba3dacb0cb0e6e3f8b6dc9362b22d6547 /urpm.pm
parent444eed89d799da4686b90b70e81deafe10b40ae5 (diff)
downloadurpmi-6ad8276603af8eaba9f53a821bda3ae19cfdd76f.tar
urpmi-6ad8276603af8eaba9f53a821bda3ae19cfdd76f.tar.gz
urpmi-6ad8276603af8eaba9f53a821bda3ae19cfdd76f.tar.bz2
urpmi-6ad8276603af8eaba9f53a821bda3ae19cfdd76f.tar.xz
urpmi-6ad8276603af8eaba9f53a821bda3ae19cfdd76f.zip
- all tools:
o cdrom:// replaces removable://
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm17
1 files changed, 14 insertions, 3 deletions
diff --git a/urpm.pm b/urpm.pm
index aec79d5e..43cd4004 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -202,16 +202,27 @@ sub file_from_local_url {
}
sub file_from_local_medium {
my ($medium, $o_url) = @_;
- file_from_local_url($o_url || $medium->{url});
+ my $url = $o_url || $medium->{url};
+ if ($url =~ m!^cdrom://(.*)!) {
+ my $rel = $1;
+ $medium->{mntpoint} or do { require Carp; Carp::croak("cdrom is not mounted yet!\n") };
+ "$medium->{mntpoint}/$rel";
+ } else {
+ file_from_local_url($url);
+ }
}
sub is_local_url {
my ($url) = @_;
- file_from_local_url($url);
+ file_from_local_url($url) || is_cdrom_url($url);
}
sub is_local_medium {
my ($medium) = @_;
is_local_url($medium->{url});
}
+sub is_cdrom_url {
+ my ($url) = @_;
+ protocol_from_url($url) eq 'cdrom';
+}
sub db_open_or_die {
my ($urpm, $root, $b_write_perm) = @_;
@@ -399,7 +410,7 @@ B<media>: [ {
start => int, end => int, name => string, url => string,
virtual => bool, media_info_dir => string, with_synthesis => string,
no-media-info => bool,
- removable => string, downloader => string,
+ iso => string, downloader => string,
ignore => bool, update => bool, modified => bool, really_modified => bool,
unknown_media_info => bool,
} ],