diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-23 11:47:51 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-23 11:47:51 +0000 |
commit | 49ad944d94b7278d25fe96972a0028bb5a2e79a5 (patch) | |
tree | 7741546ff722a2824b4f36f57a77ad180b3ef33e /urpm | |
parent | 8747855c9d65d3055e223da4a30488ef99570771 (diff) | |
download | urpmi-49ad944d94b7278d25fe96972a0028bb5a2e79a5.tar urpmi-49ad944d94b7278d25fe96972a0028bb5a2e79a5.tar.gz urpmi-49ad944d94b7278d25fe96972a0028bb5a2e79a5.tar.bz2 urpmi-49ad944d94b7278d25fe96972a0028bb5a2e79a5.tar.xz urpmi-49ad944d94b7278d25fe96972a0028bb5a2e79a5.zip |
create sync_rel_one() and use it
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/download.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/urpm/download.pm b/urpm/download.pm index dee10c53..18448981 100644 --- a/urpm/download.pm +++ b/urpm/download.pm @@ -837,11 +837,16 @@ sub sync_rel { } } +sub sync_rel_one { + my ($urpm, $medium, $rel_file, %options) = @_; + + my $files = sync_rel($urpm, $medium, [$rel_file], %options) or return; + $files->[0]; +} + sub sync_url { my ($urpm, $url, %options) = @_; - - my $files = sync_rel($urpm, { url => dirname($url) }, [basename($url)], %options) or return; - @$files; + sync_rel_one($urpm, { url => dirname($url) }, basename($url), %options); } sub sync_rel_to { |