summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-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 {