aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Victor Duarte Martins <jvictor@mandriva.com>2010-04-06 20:39:58 +0000
committerJoão Victor Duarte Martins <jvictor@mandriva.com>2010-04-06 20:39:58 +0000
commitf5fef833d523cc0919fae5cc2ddc87371ccf32c9 (patch)
treef75ba77d22da131153e163cf9cb8cd301bba0c6d
parent60bc5a7fc66e3d70cffe19734145ebd22071748b (diff)
downloadrpmdrake-distro/mdv2009.1.tar
rpmdrake-distro/mdv2009.1.tar.gz
rpmdrake-distro/mdv2009.1.tar.bz2
rpmdrake-distro/mdv2009.1.tar.xz
rpmdrake-distro/mdv2009.1.zip
Bugfix update version 5.16.6 (bug #40556)distro/mdv2009.1
-rw-r--r--Makefile2
-rw-r--r--NEWS6
-rw-r--r--Rpmdrake/gui.pm14
-rw-r--r--Rpmdrake/open_db.pm9
-rw-r--r--Rpmdrake/pkg.pm23
5 files changed, 42 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index c7974b67..a6934688 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = 5.16.5
+VERSION = 5.16.6
NAME = rpmdrake
DIRS = grpmi po data mime
diff --git a/NEWS b/NEWS
index aa76c108..4a3a6600 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+Version 5.16.6 - 6 April 2010, João Victor Martins
+
+- rpmdrake:
+ o inactive backports are only listed in the "Backports" view (fixes
+ #40556)
+
Version 5.16.5 - 1 June 2009, Thierry Vignaud
- rpmdrake:
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm
index 40334a42..3cd9cd1a 100644
--- a/Rpmdrake/gui.pm
+++ b/Rpmdrake/gui.pm
@@ -524,19 +524,25 @@ sub pkgs_provider {
all => [ keys %$pkgs ],
);
my %tmp_filter_methods = (
- all => sub { [ keys %$pkgs ] },
+ all => sub {
+ [ difference2([ keys %$pkgs ], $h->{inactive_backports}) ]
+ },
all_updates => sub {
# potential "updates" from media not tagged as updates:
if (!$options{pure_updates} && !$Rpmdrake::pkg::need_restart) {
[ @{$h->{updates}},
difference2([ grep { is_updatable($_) } @{$h->{installable}} ], $h->{backports}) ];
} else {
- $h->{updates};
+ [ difference2($h->{updates}, $h->{inactive_backports}) ];
}
},
backports => sub { $h->{backports} },
- meta_pkgs => sub { $h->{meta_pkgs} },
- gui_pkgs => sub { $h->{gui_pkgs} },
+ meta_pkgs => sub {
+ [ difference2($h->{meta_pkgs}, $h->{inactive_backports}) ]
+ },
+ gui_pkgs => sub {
+ [ difference2($h->{gui_pkgs}, $h->{inactive_backports}) ]
+ },
);
foreach my $importance (qw(bugfix security normal)) {
$tmp_filter_methods{$importance} = sub {
diff --git a/Rpmdrake/open_db.pm b/Rpmdrake/open_db.pm
index 9078459a..d8569940 100644
--- a/Rpmdrake/open_db.pm
+++ b/Rpmdrake/open_db.pm
@@ -34,6 +34,7 @@ use feature 'state';
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(fast_open_urpmi_db
+ get_backport_media
get_inactive_backport_media
get_update_medias
is_it_a_devel_distro
@@ -119,9 +120,15 @@ sub is_it_a_devel_distro {
return $res;
}
+sub get_backport_media {
+ my ($urpm) = @_;
+ grep { $_->{name} =~ /backport/i &&
+ $_->{name} !~ /debug|sources/i } @{$urpm->{media}};
+}
+
sub get_inactive_backport_media {
my ($urpm) = @_;
- map { $_->{name} } grep { $_->{ignore} && $_->{name} =~ /backport/i && $_->{name} !~ /debug|sources/i } @{$urpm->{media}};
+ map { $_->{name} } grep { $_->{ignore} } get_backport_media($urpm);
}
sub get_update_medias {
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 3ddca0f8..6d10208f 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -489,9 +489,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);
@@ -500,14 +497,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 };
}
}
@@ -537,7 +547,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
};
}