aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrpmdrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index c0ee632c..e3f3e6b2 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -619,7 +619,8 @@ or you already installed all of them."));
}
@elems = map { [ $_, !$flat && ctreefy($pkgs->{$_}{pkg}->group) ] } @keys;
}
- my %sortmethods = (by_size => sub { sort { $pkgs->{$b->[0]}{pkg}->size <=> $pkgs->{$a->[0]}{pkg}->size } @_ },
+ my %sortmethods = (
+ by_size => sub { sort { $pkgs->{$b->[0]}{pkg}->size <=> $pkgs->{$a->[0]}{pkg}->size } @_ },
by_selection => sub { sort { $pkgs->{$b->[0]}{selected} <=> $pkgs->{$a->[0]}{selected}
|| uc($a->[0]) cmp uc($b->[0]) } @_ },
by_leaves => sub {
@@ -627,6 +628,7 @@ or you already installed all of them."));
sort { $b->[1] <=> $a->[1] } grep { exists $pkgs->{$_->[0]} } map { [ split ] } `$pkgs_times`;
},
flat => sub { sort { uc($a->[0]) cmp uc($b->[0]) } @_ },
+ by_medium => sub { sort { $a->[3] <=> $b->[3] || uc($a->[0]) cmp uc($b->[0]) } @_ },
);
if ($flat) {
$add_node->($_->[0], '') foreach $sortmethods{$mode || 'flat'}->(@elems);
@@ -635,7 +637,9 @@ or you already installed all of them."));
$add_node->($_->[0], N("All")) foreach $sortmethods{flat}->(@elems);
$tree->expand_row($tree_model->get_path($tree_model->get_iter_first), 0);
} elsif ($mode eq 'by_source') {
- $add_node->($_->[0], pkg2medium($pkgs->{$_->[0]}{pkg}, $urpm)->{name}) foreach $sortmethods{flat}->(@elems);
+ $add_node->($_->[0], $_->[2]) foreach $sortmethods{by_medium}->(map {
+ my $m = pkg2medium($pkgs->{$_->[0]}{pkg}, $urpm); [ @$_, $m->{name}, $m->{priority} ];
+ } @elems);
} elsif ($mode eq 'by_presence') {
$add_node->(
$_->[0], $pkgs->{$_->[0]}{pkg}->flag_installed && !$pkgs->{$_->[0]}{pkg}->flag_skip