diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:16:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 19:16:21 +0000 |
commit | 43235c1bb6da3a3c89b78de1afdf2349cf01d037 (patch) | |
tree | 9e3494cea03437bde57a9e96cc2acba24ddc67ff /urpm/get_pkgs.pm | |
parent | c6d6879b8c225706a484ff45ffd48007e03e3bf3 (diff) | |
download | urpmi-43235c1bb6da3a3c89b78de1afdf2349cf01d037.tar urpmi-43235c1bb6da3a3c89b78de1afdf2349cf01d037.tar.gz urpmi-43235c1bb6da3a3c89b78de1afdf2349cf01d037.tar.bz2 urpmi-43235c1bb6da3a3c89b78de1afdf2349cf01d037.tar.xz urpmi-43235c1bb6da3a3c89b78de1afdf2349cf01d037.zip |
add {pkgs} to $blist, it deprecates {list}
Diffstat (limited to 'urpm/get_pkgs.pm')
-rw-r--r-- | urpm/get_pkgs.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm index 5edb1548..682fe20d 100644 --- a/urpm/get_pkgs.pm +++ b/urpm/get_pkgs.pm @@ -109,7 +109,7 @@ sub selected2local_and_blists { my @blists = map { my $medium = $_; - my %sources; + my %pkgs; if (urpm::media::is_valid_medium($medium) && !$medium->{ignore}) { while (@remaining_ids) { my $id = $remaining_ids[0]; @@ -117,10 +117,14 @@ sub selected2local_and_blists { shift @remaining_ids; my $pkg = $urpm->{depslist}[$id]; - $sources{$id_map{$id}} = "$medium->{url}/" . $pkg->filename; + $pkgs{$id_map{$id}} = $pkg; } } - %sources ? { medium => $medium, list => \%sources } : (); + if (%pkgs) { + my $blist = { medium => $medium, pkgs => \%pkgs }; + $blist->{list} = { map { $_ => urpm::blist_pkg_to_url($blist, $pkgs{$_}) } keys %pkgs }; + $blist; + } else { () } } (@{$urpm->{media} || []}); if (@remaining_ids) { |