summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-03-07 17:32:04 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-03-07 17:32:04 +0000
commit653c799da0aa230257f3487228be1a132993db36 (patch)
tree320fd8d7f6706c32203f6957dbb49b48d0df5e60 /perl-install/ugtk2.pm
parent809666fc2e83bfeb5056374a00aabf6ab34a0cd2 (diff)
downloaddrakx-653c799da0aa230257f3487228be1a132993db36.tar
drakx-653c799da0aa230257f3487228be1a132993db36.tar.gz
drakx-653c799da0aa230257f3487228be1a132993db36.tar.bz2
drakx-653c799da0aa230257f3487228be1a132993db36.tar.xz
drakx-653c799da0aa230257f3487228be1a132993db36.zip
fix rpmdrake dumping core when multiple searchs in
"selected" and "upgradable" sorting modes (#2899)
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 2384ab19a..3d3027064 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -1173,11 +1173,23 @@ sub ask_browse_tree_info_given_widgets {
foreach my $node (@{$ptree{$_}}) {
my $category;
my $parent = $node;
+ my @parents;
while ($parent = $w->{tree_model}->iter_parent($parent)) { #- LEAKS
my $parent_name = $w->{tree_model}->get($parent, 0);
$category = $category ? "$parent_name|$category" : $parent_name;
+ $_->[1] = "$parent_name|$_->[1]" foreach @parents;
+ push @parents, [ $parent, $category ];
+ }
+ if ($category =~ /^\Q$cat/) {
+ push @to_remove, $node;
+ foreach (@parents) {
+ next if $_->[1] eq $cat || !exists $wtree{$_->[1]};
+ delete $wtree{$_->[1]};
+ delete $node_state{$w->{tree_model}->get_path_str($_->[0])};
+ delete $state_stats{$w->{tree_model}->get_path_str($_->[0])};
+ $_->[0]->free;
+ }
}
- $cat eq $category and push @to_remove, $node;
}
foreach (@to_remove) {
delete $node_state{$w->{tree_model}->get_path_str($_)};