summaryrefslogtreecommitdiffstats
path: root/urpm/download.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-23 11:47:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-23 11:47:51 +0000
commit49ad944d94b7278d25fe96972a0028bb5a2e79a5 (patch)
tree7741546ff722a2824b4f36f57a77ad180b3ef33e /urpm/download.pm
parent8747855c9d65d3055e223da4a30488ef99570771 (diff)
downloadurpmi-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/download.pm')
-rw-r--r--urpm/download.pm11
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 {