diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:57:36 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:57:36 +0000 |
commit | 5eb733f5c2ce1aedce36cd039c65e9fb5fabb32e (patch) | |
tree | bd800a16ae79145ae4af1f6db443dbe59de5ec2e | |
parent | cc456f776b4ad178ec2b092e674af0fd2cc8b597 (diff) | |
download | urpmi-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}
-rw-r--r-- | urpm/cdrom.pm | 14 | ||||
-rw-r--r-- | urpm/removable.pm | 4 |
2 files changed, 9 insertions, 9 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; diff --git a/urpm/removable.pm b/urpm/removable.pm index 57b52f95..f4892bc0 100644 --- a/urpm/removable.pm +++ b/urpm/removable.pm @@ -147,8 +147,8 @@ sub try_mounting_non_cdroms { sub _blist_first_url { my ($blist) = @_; - my ($url) = values %{$blist->{list}}; - $url; + my ($pkg) = values %{$blist->{pkgs}}; + urpm::blist_pkg_to_url($blist, $pkg); } 1; |