diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 20:22:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 20:22:28 +0000 |
commit | aa55d788ed9d68828b7eb597b4b2a32edb077672 (patch) | |
tree | 24f03d5a0140f967d560080bb686340c0b4b9994 /urpm | |
parent | bbbc64f7735eaeb7f5163317f5ddfdb71f6f8615 (diff) | |
download | urpmi-aa55d788ed9d68828b7eb597b4b2a32edb077672.tar urpmi-aa55d788ed9d68828b7eb597b4b2a32edb077672.tar.gz urpmi-aa55d788ed9d68828b7eb597b4b2a32edb077672.tar.bz2 urpmi-aa55d788ed9d68828b7eb597b4b2a32edb077672.tar.xz urpmi-aa55d788ed9d68828b7eb597b4b2a32edb077672.zip |
now, get rid of blist->{list} :)
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/get_pkgs.pm | 9 | ||||
-rw-r--r-- | urpm/install.pm | 5 |
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}); |