summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-03 14:44:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-03 14:44:10 +0000
commitbb99abdb7eb969270226e945ad74b4b479090a2c (patch)
tree9ab9835c5c94da3df864b6099d8a7bfd038ce2df
parent5dfa3e3fdc43acb93c13ae2ce3e22b646746dfd3 (diff)
downloadurpmi-bb99abdb7eb969270226e945ad74b4b479090a2c.tar
urpmi-bb99abdb7eb969270226e945ad74b4b479090a2c.tar.gz
urpmi-bb99abdb7eb969270226e945ad74b4b479090a2c.tar.bz2
urpmi-bb99abdb7eb969270226e945ad74b4b479090a2c.tar.xz
urpmi-bb99abdb7eb969270226e945ad74b4b479090a2c.zip
modify _probe_with_try_list() to be able to use sync_rel()
-rw-r--r--urpm/media.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/urpm/media.pm b/urpm/media.pm
index 3dd9747b..495b1116 100644
--- a/urpm/media.pm
+++ b/urpm/media.pm
@@ -1004,8 +1004,9 @@ sub _probe_with_try_list {
my $base = file_from_local_medium($medium) || $medium->{url};
foreach my $media_info_dir (@media_info_dirs) {
- my $url = reduce_pathname("$base/$media_info_dir") . '/synthesis.hdlist.cz';
- if ($f->($url)) {
+ my $file = "$media_info_dir/synthesis.hdlist.cz";
+ my $url = reduce_pathname("$base/$file");
+ if ($f->($url, $file)) {
$urpm->{debug} and $urpm->{debug}("found synthesis: $url");
$medium->{media_info_dir} = $media_info_dir;
delete $medium->{unknown_media_info};
@@ -1469,10 +1470,10 @@ sub _update_medium__parse_if_unmodified__remote {
if (!_synthesis_dir($medium)) {
my $err;
_probe_with_try_list($urpm, $medium, sub {
- my ($url) = @_;
- my $f = "$urpm->{cachedir}/partial/" . basename($url);
+ my ($url, $rel_url) = @_;
+ my $f = "$urpm->{cachedir}/partial/" . basename($rel_url);
$options->{force} and unlink $f;
- if (urpm::download::sync($urpm, $medium, [ $url ],
+ if (urpm::download::sync_rel($urpm, $medium, [ $rel_url ],
quiet => $options->{quiet}, callback => $options->{callback}) && _check_synthesis($f)) {
$urpm->{log}(N("found probed synthesis as %s", $url));
1;