aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-08-23 09:11:30 +0000
committerThierry Vignaud <tv@mandriva.org>2006-08-23 09:11:30 +0000
commit90883740c6e315521b6e45563758f06b0fe39891 (patch)
treef9298b21eab5ba17a664108c2e1e4da1047e0cfb
parentfc8152c1fe8d41fd413d1e591b6462a004501994 (diff)
downloadrpmdrake-90883740c6e315521b6e45563758f06b0fe39891.tar
rpmdrake-90883740c6e315521b6e45563758f06b0fe39891.tar.gz
rpmdrake-90883740c6e315521b6e45563758f06b0fe39891.tar.bz2
rpmdrake-90883740c6e315521b6e45563758f06b0fe39891.tar.xz
rpmdrake-90883740c6e315521b6e45563758f06b0fe39891.zip
(run_treeview_dialog) precreate all groups in left tree when building the tree
-rwxr-xr-xrpmdrake12
1 files changed, 7 insertions, 5 deletions
diff --git a/rpmdrake b/rpmdrake
index 7e2e0844..807a2e76 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -749,12 +749,14 @@ or you already installed all of them."));
? N("Upgradable") : N("Addable")
) foreach $sortmethods{flat}->(@elems);
} else {
- #- special case, we don't populate all the tree at first (to speed things up)
+ #- we populate all the groups tree at first
%elems = ();
- foreach my $root (sort { $a cmp $b } uniq(map { (split /\|/, $_->[1])[0] } @elems)) {
- $add_node->('', $root);
- @{$elems{$root}} = sort { $a->[1] cmp $b->[1] || uc($a->[0]) cmp uc($b->[0]) }
- grep { $_->[1] =~ /^\Q$root\E\b/ } @elems;
+ # better loop on packages, create groups tree and push packages in the proper place:
+ foreach my $pkg (@elems) {
+ my $grp = $pkg->[1];
+ $options->{add_parent}->($grp);
+ $elems{$grp} ||= [ ];
+ push @{$elems{$grp}}, $pkg;
}
}
}