summaryrefslogtreecommitdiffstats
path: root/urpm/get_pkgs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r--urpm/get_pkgs.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 30f8f0fb..d0cb60f1 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -195,7 +195,9 @@ sub download_packages_of_distant_media {
}
if (%{$blist_distant{pkgs}}) {
- _download_packages_of_distant_media($urpm, $sources, \%errors, \%blist_distant, %options);
+ my ($remote_sources, $remote_errors) = _download_packages_of_distant_media($urpm, \%blist_distant, %options);
+ put_in_hash ($sources, $remote_sources);
+ put_in_hash (\%errors, $remote_errors);
}
}
@@ -210,9 +212,10 @@ sub download_packages_of_distant_media {
# download packages listed in $blist,
# and put the result in $sources or $errors
sub _download_packages_of_distant_media {
- my ($urpm, $sources, $errors, $blist, %options) = @_;
+ my ($urpm, $blist, %options) = @_;
my $cachedir = urpm::valid_cachedir($urpm);
+ my (%sources, %errors);
$urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $blist->{medium}{name}));
if (urpm::download::sync_rel($urpm, $blist->{medium}, [ urpm::blist_to_filenames($blist) ],
@@ -236,14 +239,15 @@ sub _download_packages_of_distant_media {
my $url = urpm::blist_pkg_to_url($blist, $pkg);
if ($filename && -s "$cachedir/partial/$filename") {
if (my $rpm = verify_partial_rpm_and_move($urpm, $cachedir, $filename)) {
- $sources->{$id} = $rpm;
+ $sources{$id} = $rpm;
} else {
- $errors->{$id} = [ $url, 'bad' ];
+ $errors{$id} = [ $url, 'bad' ];
}
} else {
- $errors->{$id} = [ $url, 'missing' ];
+ $errors{$id} = [ $url, 'missing' ];
}
}
+ (\%sources, \%errors)
}
1;