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