summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm')
-rw-r--r--urpm/get_pkgs.pm9
-rw-r--r--urpm/install.pm5
2 files changed, 4 insertions, 10 deletions
diff --git a/urpm/get_pkgs.pm b/urpm/get_pkgs.pm
index ceef8e66..6e3ebfc4 100644
--- a/urpm/get_pkgs.pm
+++ b/urpm/get_pkgs.pm
@@ -120,11 +120,7 @@ sub selected2local_and_blists {
$pkgs{$id_map{$id}} = $pkg;
}
}
- if (%pkgs) {
- my $blist = { medium => $medium, pkgs => \%pkgs };
- $blist->{list} = { map { $_ => urpm::blist_pkg_to_url($blist, $pkgs{$_}) } keys %pkgs };
- $blist;
- } else { () }
+ %pkgs ? { medium => $medium, pkgs => \%pkgs } : ();
} (@{$urpm->{media} || []});
if (@remaining_ids) {
@@ -142,7 +138,8 @@ sub _create_old_list_from_blists {
[ map {
my $medium = $_;
my ($blist) = grep { $_->{medium} == $medium } @$blists;
- $blist->{list};
+
+ { map { $_ => urpm::blist_pkg_to_url($blist, $blist->{pkgs}{$_}) } keys %{$blist->{pkgs}} };
} @$media ];
}
diff --git a/urpm/install.pm b/urpm/install.pm
index 6a3e3770..82f2a481 100644
--- a/urpm/install.pm
+++ b/urpm/install.pm
@@ -30,10 +30,7 @@ sub prepare_transaction {
my ($_urpm, $set, $blists, $sources) = @_;
my @blists_subset = map {
- +{ %$_,
- list => _hash_intersect_list($_->{list}, $set->{upgrade}),
- pkgs => _hash_intersect_list($_->{pkgs}, $set->{upgrade}),
- };
+ +{ %$_, pkgs => _hash_intersect_list($_->{pkgs}, $set->{upgrade}) };
} @$blists;
\@blists_subset, _hash_intersect_list($sources, $set->{upgrade});