summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm4
-rw-r--r--urpm/get_pkgs.pm2
2 files changed, 5 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index e19cc745..34745d7a 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -210,6 +210,10 @@ sub blist_to_urls {
my ($blist) = @_;
_blist_pkg_to_urls($blist, values %{$blist->{pkgs}});
}
+sub blist_to_filenames {
+ my ($blist) = @_;
+ map { $_->filename } values %{$blist->{pkgs}};
+}
sub protocol_from_url {
my ($url) = @_;
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index 6e3ebfc4..82bccb01 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -220,7 +220,7 @@ sub _download_packages_of_distant_media {
}
$urpm->{log}(N("retrieving rpm files from medium \"%s\"...", $blist->{medium}{name}));
- if (urpm::download::sync($urpm, $blist->{medium}, [ urpm::blist_to_urls($blist) ],
+ if (urpm::download::sync_rel($urpm, $blist->{medium}, [ urpm::blist_to_filenames($blist) ],
dir => "$cachedir/partial", quiet => $options{quiet},
resume => $urpm->{options}{resume}, callback => $options{callback})) {
$urpm->{log}(N("...retrieving done"));