summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_gtk.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-02 14:58:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-02 14:58:39 +0000
commit5668430f2dfc8512118e734c1263087b7f50856c (patch)
tree93c6163c92be19f09b974381b313628b433a4df1 /perl-install/install_steps_gtk.pm
parent94169cb1741e5497a2e6b9031c65a24208631e1e (diff)
downloaddrakx-backup-do-not-use-5668430f2dfc8512118e734c1263087b7f50856c.tar
drakx-backup-do-not-use-5668430f2dfc8512118e734c1263087b7f50856c.tar.gz
drakx-backup-do-not-use-5668430f2dfc8512118e734c1263087b7f50856c.tar.bz2
drakx-backup-do-not-use-5668430f2dfc8512118e734c1263087b7f50856c.tar.xz
drakx-backup-do-not-use-5668430f2dfc8512118e734c1263087b7f50856c.zip
(choosePackagesTree): in the tree, "Other" must be after the "best"
packages
Diffstat (limited to 'perl-install/install_steps_gtk.pm')
-rw-r--r--perl-install/install_steps_gtk.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 590c83760..9bdecce34 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -324,11 +324,21 @@ sub choosePackagesTree {
$add_node->($_, undef) foreach sort grep { my $pkg = pkgs::packageByName($packages, $_);
pkgs::packageMedium($pkg)->{selected} } keys %{$packages->{names}};
} else {
+ my (@others, $old_root);
foreach (sort @$compss) {
($root, $leaf) = m|(.*)/(.+)|o or ($root, $leaf) = ('', $_);
+ if ($root ne $old_root) {
+ $add_node->($_, $old_root . '/' . _("Other")) foreach @others;
+ @others = ();
+ $old_root = $root
+ }
my $pkg = pkgs::packageByName($packages, $leaf);
- $root .= '/' . _("Other") if pkgs::packageRate($pkg) < 4;
- $add_node->($leaf, $root) if pkgs::packageMedium($pkg)->{selected};
+ pkgs::packageMedium($pkg)->{selected} or next;
+ if (pkgs::packageRate($pkg) < 4) {
+ push @others, $leaf;
+ } else {
+ $add_node->($leaf, $root);
+ }
}
}
$tree->thaw;