From 94cfc57850981b85f9fc027621a3439e9d36eb9b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 3 Sep 2008 13:31:37 +0000 Subject: create urpm::download::sync_url() and use it --- urpm/download.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'urpm/download.pm') diff --git a/urpm/download.pm b/urpm/download.pm index 244d6d72..c36cf62a 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -769,6 +769,12 @@ sub sync_rel { sync($urpm, $medium, \@files, %options); } +sub sync_url { + my ($urpm, $url, %options) = @_; + + sync($urpm, undef, [$url], %options); +} + #- $medium can be undef #- known options: quiet, resume, callback sub sync { @@ -801,7 +807,7 @@ sub get_content { my $file = "$urpm->{cachedir}/partial/" . basename($url); unlink $file; # prevent "partial file" errors - urpm::download::sync($urpm, undef, [ $url ], quiet => 1) or return; + sync_url($urpm, $url, quiet => 1) or return; my @l = cat_($file); unlink $file; -- cgit v1.2.1