aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
authorJoão Victor Duarte Martins <jvictor@mandriva.com>2010-04-06 16:08:42 +0000
committerJoão Victor Duarte Martins <jvictor@mandriva.com>2010-04-06 16:08:42 +0000
commit1a933c854c9f5357e4898f5c5e56095aea0eb88a (patch)
treefc7454ad96a9ab9428025adfa654e404efe1655e /Rpmdrake/pkg.pm
parent9a32f85aaef279ce534a9e5e63e12c50bfaeac3c (diff)
downloadrpmdrake-1a933c854c9f5357e4898f5c5e56095aea0eb88a.tar
rpmdrake-1a933c854c9f5357e4898f5c5e56095aea0eb88a.tar.gz
rpmdrake-1a933c854c9f5357e4898f5c5e56095aea0eb88a.tar.bz2
rpmdrake-1a933c854c9f5357e4898f5c5e56095aea0eb88a.tar.xz
rpmdrake-1a933c854c9f5357e4898f5c5e56095aea0eb88a.zip
Fixes the inactive backports listing (#40556)
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rw-r--r--Rpmdrake/pkg.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 79bc7f7e..795a2ae6 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -495,9 +495,6 @@ sub get_pkgs {
$urpm->{rpmdrake_state} = $state; #- Don't forget it
$gurpm->progress($level = 0.7);
- my @search_medias = grep { $_->{searchmedia} } @{$urpm->{media}};
-
- my @backports;
reset_pbar_count(1);
foreach my $pkg (@{$urpm->{depslist}}) {
update_pbar($gurpm);
@@ -506,14 +503,27 @@ sub get_pkgs {
push @installable_pkgs, $name;
$all_pkgs{$name} = { pkg => $pkg };
}
- foreach my $medium (@search_medias) {
+
+ my @inactive_backports;
+ my @active_backports;
+ my @backport_medias = get_backport_media($urpm);
+
+ foreach my $medium (@backport_medias) {
update_pbar($gurpm);
+
+ # The 'searchmedia' flag differentiates inactive backport medias
+ # (because that option was passed to urpm::media::configure to
+ # temporarily enable them)
+
+ my $backports =
+ $medium->{searchmedia} ? \@inactive_backports : \@active_backports;
+
foreach my $pkg_id ($medium->{start} .. $medium->{end}) {
next if !$pkg_id;
my $pkg = $urpm->{depslist}[$pkg_id];
$pkg->flag_upgrade or next;
my $name = urpm_name($pkg);
- push @backports, $name;
+ push @$backports, $name;
$all_pkgs{$name} = { pkg => $pkg };
}
}
@@ -543,7 +553,8 @@ sub get_pkgs {
meta_pkgs => \@meta_pkgs,
gui_pkgs => [ grep { member(($all_pkgs{$_}{pkg}->fullname)[0], @gui_pkgs) } keys %all_pkgs ],
update_descr => $update_descr,
- backports => \@backports,
+ backports => [ @inactive_backports, @active_backports ],
+ inactive_backports => \@inactive_backports
};
}