summaryrefslogtreecommitdiffstats
path: root/urpm/cdrom.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 19:57:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 19:57:36 +0000
commit5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e (patch)
treebd800a16ae79145ae4af1f6db443dbe59de5ec2e /urpm/cdrom.pm
parentcc456f776b4ad178ec2b092e674af0fd2cc8b597 (diff)
downloadurpmi-5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e.tar
urpmi-5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e.tar.gz
urpmi-5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e.tar.bz2
urpmi-5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e.tar.xz
urpmi-5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e.zip
migrate to use blist->{pkgs} instead of blist->{list}
Diffstat (limited to 'urpm/cdrom.pm')
-rw-r--r--urpm/cdrom.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/urpm/cdrom.pm b/urpm/cdrom.pm
index 05bd86af..1ae8cceb 100644
--- a/urpm/cdrom.pm
+++ b/urpm/cdrom.pm
@@ -95,8 +95,8 @@ sub _check_notfound {
$blist->{medium}{mntpoint} or return;
- foreach (values %{$blist->{list}}) {
- my $dir_ = _filepath($blist->{medium}, $_) or next;
+ foreach (values %{$blist->{pkgs}}) {
+ my $dir_ = _filepath($blist, $_) or next;
-r $dir_ or return 1;
}
0;
@@ -169,10 +169,10 @@ sub _mount_cdrom {
#- side-effects: none
sub _filepath {
- my ($medium, $url) = @_;
+ my ($blist, $pkg) = @_;
- chomp $url;
- my $filepath = file_from_local_medium($medium, $url) or return;
+ my $url = urpm::blist_pkg_to_url($blist, $pkg);
+ my $filepath = file_from_local_medium($blist->{medium}, $url) or return;
$filepath =~ m!/.*/! or return; #- is this really needed??
$filepath;
}
@@ -197,8 +197,8 @@ sub _do_the_copy {
sub _copy_from_cdrom__if_needed {
my ($urpm, $blist, $sources, $want_copy) = @_;
- while (my ($i, $url) = each %{$blist->{list}}) {
- my $filepath = _filepath($blist->{medium}, $url) or next;
+ while (my ($i, $pkg) = each %{$blist->{pkgs}}) {
+ my $filepath = _filepath($blist, $pkg) or next;
if (-r $filepath) {
$sources->{$i} = $want_copy ? _do_the_copy($urpm, $filepath) : $filepath;