summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 19:29:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 19:29:04 +0000
commit7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4 (patch)
tree2a132ca2bfc52244a511c57b882ff76d840214f1
parentfc3d747a072ce053ba3e164b76db07d087bbfe95 (diff)
downloadurpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar
urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.gz
urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.bz2
urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.xz
urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.zip
create blist_to_urls()
-rw-r--r--urpm.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 30aad8d5..f3e81d92 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -196,9 +196,19 @@ sub tune_rpm {
}
}
+sub _blist_pkg_to_urls {
+ my ($blist, @pkgs) = @_;
+ my $base_url = $blist->{medium}->{url} . '/';
+ map { $base_url . $_->filename } @pkgs;
+}
sub blist_pkg_to_url {
my ($blist, $pkg) = @_;
- $blist->{medium}->{url} . '/' . $pkg->filename;
+ my ($url) = _blist_pkg_to_urls($blist, $pkg);
+ $url;
+}
+sub blist_to_urls {
+ my ($blist) = @_;
+ _blist_pkg_to_urls($blist, values %{$blist->{pkgs}});
}
sub protocol_from_url {