diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:29:04 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:29:04 +0000 |
commit | 7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4 (patch) | |
tree | 2a132ca2bfc52244a511c57b882ff76d840214f1 /urpm.pm | |
parent | fc3d747a072ce053ba3e164b76db07d087bbfe95 (diff) | |
download | urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.gz urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.bz2 urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.tar.xz urpmi-7608251f9c8c3e0d48f29cfa3e6f1444b9e56ee4.zip |
create blist_to_urls()
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 { |