summaryrefslogtreecommitdiffstats
path: root/urpmq
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 18:56:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 18:56:50 +0000
commit75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b (patch)
treef35d035d9fde81d87dcc16eea0e6e83e148761fe /urpmq
parent5ee0b581848c4ddde43e1a4e730dc10b34dc9378 (diff)
downloadurpmi-75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b.tar
urpmi-75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b.tar.gz
urpmi-75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b.tar.bz2
urpmi-75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b.tar.xz
urpmi-75d8cd0b15bde3504b5d2d1b66fae04344e1ed2b.zip
migrate to urpm::get_pkgs::selected2local_and_blists()
Diffstat (limited to 'urpmq')
-rwxr-xr-xurpmq11
1 files changed, 5 insertions, 6 deletions
diff --git a/urpmq b/urpmq
index b76919a8..19d4045e 100755
--- a/urpmq
+++ b/urpmq
@@ -375,17 +375,16 @@ if ($options{list_aliases}) {
if ($options{sources} || %need_xml_info)
{
- my ($local_sources, $list) = urpm::get_pkgs::selected2list($urpm, $state->{selected});
+ my ($local_sources, $blists) = urpm::get_pkgs::selected2local_and_blists($urpm, $state->{selected});
my %xml_info_pkgs;
if (%need_xml_info) {
# get descriptions of update sources
my $updates_descr = urpm::get_updates_description($urpm);
- my @selected = uniq(map { keys %$_ } @$list);
-
- foreach my $medium (@{$urpm->{media} || []}) {
- my @l = grep { $medium->{start} <= $_ && $_ <= $medium->{end} } @selected or next;
+ foreach my $blist (@$blists) {
+ my $medium = $blist->{medium};
+ my @l = keys %{$blist->{list}};
my @pkgs = map { $urpm->{depslist}[$_] } @l or next;
if (my $dir = urpm::file_from_local_url($medium->{url})) {
@@ -479,7 +478,7 @@ if ($options{list_aliases}) {
}
} elsif ($options{sources}) {
print "$_\n" foreach values %$local_sources;
- print "$_\n" foreach map { values %$_ } @$list;
+ print "$_\n" foreach map { values %{$_->{list}} } @$blists;
}
exit 0;
} elsif ($options{summary}) {