summaryrefslogtreecommitdiffstats
path: root/urpm/get_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 19:46:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 19:46:43 +0000
commitd304abca4acfe8b0347f40c60c1123aa94f118d1 (patch)
tree3e6ffb2904bae9afe04752cd3774f76ab580d356 /urpm/get_pkgs.pm
parentb899cb44370cd85a650fb00975b67e7b825d6073 (diff)
downloadurpmi-d304abca4acfe8b0347f40c60c1123aa94f118d1.tar
urpmi-d304abca4acfe8b0347f40c60c1123aa94f118d1.tar.gz
urpmi-d304abca4acfe8b0347f40c60c1123aa94f118d1.tar.bz2
urpmi-d304abca4acfe8b0347f40c60c1123aa94f118d1.tar.xz
urpmi-d304abca4acfe8b0347f40c60c1123aa94f118d1.zip
migrate download_packages_of_distant_media() to use blist->{pkgs} instead of blist->{list}
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r--urpm/get_pkgs.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 726b244f..ba62e0c7 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -179,20 +179,18 @@ sub download_packages_of_distant_media {
my %blist_distant = (%$blist, pkgs => {});
#- examine all files to know what can be indexed on multiple media.
- while (my ($id, $url) = each %{$blist->{list}}) {
+ while (my ($id, $pkg) = each %{$blist->{pkgs}}) {
#- the given URL is trusted, so the file can safely be ignored.
defined $sources->{$id} and next;
- my $local_file = file_from_local_url($url);
- if ($local_file && $local_file =~ /\.rpm$/) {
+ if (urpm::is_local_medium($blist->{medium})) {
+ my $local_file = file_from_local_url(urpm::blist_pkg_to_url($blist, $pkg));
if (-r $local_file) {
$sources->{$id} = $local_file;
} else {
$errors{$id} = [ $local_file, 'missing' ];
}
- } elsif ($url =~ m!^([^:]*):/(.*/([^/]*\.rpm))\Z!) {
- $blist_distant{pkgs}{$id} = $blist->{pkgs}{$id};
} else {
- $urpm->{error}(N("malformed URL: [%s]", $url));
+ $blist_distant{pkgs}{$id} = $pkg;
}
}