summaryrefslogtreecommitdiffstats
path: root/urpm/media.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-23 07:26:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-23 07:26:26 +0000
commit367f0ff1ed2653ad0bfb62ba9156aea78eb24803 (patch)
treea49389e58a64dc0d1625bbeb801eaa75ffe4251f /urpm/media.pm
parenta1dca5cbe9076b19ca716ed6d66f7ba6670302d4 (diff)
downloadurpmi-367f0ff1ed2653ad0bfb62ba9156aea78eb24803.tar
urpmi-367f0ff1ed2653ad0bfb62ba9156aea78eb24803.tar.gz
urpmi-367f0ff1ed2653ad0bfb62ba9156aea78eb24803.tar.bz2
urpmi-367f0ff1ed2653ad0bfb62ba9156aea78eb24803.tar.xz
urpmi-367f0ff1ed2653ad0bfb62ba9156aea78eb24803.zip
- normalize synthesis downloading: rename it in cachedir asap just like any other media_info files
- create urpm::download::sync_rel_to()
Diffstat (limited to 'urpm/media.pm')
-rw-r--r--urpm/media.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 16e7b5f1..3f90478c 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -377,7 +377,7 @@ sub statedir_xml_info {
}
sub cachedir_with_synthesis {
my ($urpm, $medium) = @_;
- _url_with_synthesis($medium) && "$urpm->{cachedir}/partial/" . _url_with_synthesis_basename($medium);
+ _url_with_synthesis($medium) && "$urpm->{cachedir}/partial/synthesis.hdlist.cz";
}
sub any_synthesis {
my ($urpm, $medium) = @_;
@@ -1197,9 +1197,9 @@ sub _download_media_info_file {
if (_synthesis_suffix($medium)) {
my $local_name = $prefix . _synthesis_suffix($medium) . $suffix;
- if (urpm::download::sync_rel($urpm, $medium, [_synthesis_dir_rel($medium) . "/$local_name"],
- dir => $download_dir, quiet => $quiet, callback => $o_callback)) {
- rename("$download_dir/$local_name", $result_file);
+ if (urpm::download::sync_rel_to($urpm, $medium,
+ _synthesis_dir_rel($medium) . "/$local_name", $result_file,
+ dir => $download_dir, quiet => $quiet, callback => $o_callback)) {
$found = 1;
}
}
@@ -1273,8 +1273,9 @@ sub get_synthesis__remote {
my ($urpm, $medium, $is_a_probe, $options) = @_;
my $ok = try__maybe_mirrorlist($urpm, $medium, $is_a_probe, sub {
- urpm::download::sync_rel($urpm, $medium, [ _url_with_synthesis_rel($medium) ],
- quiet => $options->{quiet}, callback => $options->{callback}) &&
+ urpm::download::sync_rel_to($urpm, $medium, _url_with_synthesis_rel($medium),
+ cachedir_with_synthesis($urpm, $medium),
+ quiet => $options->{quiet}, callback => $options->{callback}) &&
_check_synthesis(cachedir_with_synthesis($urpm, $medium));
});
if (!$ok) {