diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-14 13:13:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-14 13:13:53 +0000 |
commit | 084360c9efcea3e1bf1447b16497caaae6332e60 (patch) | |
tree | 7b094652a95d1e53662ef669a418fe7c9877f7d3 /Rpmdrake | |
parent | 4586e5f48626347979e3bc16760142c840317d1d (diff) | |
download | rpmdrake-084360c9efcea3e1bf1447b16497caaae6332e60.tar rpmdrake-084360c9efcea3e1bf1447b16497caaae6332e60.tar.gz rpmdrake-084360c9efcea3e1bf1447b16497caaae6332e60.tar.bz2 rpmdrake-084360c9efcea3e1bf1447b16497caaae6332e60.tar.xz rpmdrake-084360c9efcea3e1bf1447b16497caaae6332e60.zip |
kill "Mandriva choices"
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/gui.pm | 12 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 27 |
2 files changed, 3 insertions, 36 deletions
diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index f445e687..4a457654 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -349,7 +349,7 @@ sub toggle_all { # - "tree_submode": the default mode (by group, mandriva choice), ... # - "state": a hash of misc flags: => { flat => '0' }, # o "flat": is the tree flat or not -# - "tree_mode": mode of the tree ("mandrake_choices", "by_group", ...) (mainly used by rpmdrake) +# - "tree_mode": mode of the tree ("gui_pkgs", "by_group", ...) (mainly used by rpmdrake) sub ask_browse_tree_given_widgets_for_rpmdrake { ($common) = @_; @@ -511,7 +511,6 @@ sub pkgs_provider { $descriptions->{$name}{importance} eq $importance } @{$h->{updates}}; }; } - $filter_methods{mandrake_choices} = $filter_methods{non_installed}; switch_pkg_list_mode($mode); } @@ -763,7 +762,7 @@ sub ctreefy { } sub build_tree { - my ($tree, $tree_model, $elems, $options, $force_rebuild, $compssUsers, $flat, $mode) = @_; + my ($tree, $tree_model, $elems, $options, $force_rebuild, $flat, $mode) = @_; state $old_mode; $mode = $options->{rmodes}{$mode} || $mode; return if $old_mode eq $mode && !$force_rebuild; @@ -772,12 +771,7 @@ sub build_tree { my @elems; my $wait; $wait = statusbar_msg(N("Please wait, listing packages...")) if $MODE ne 'update'; gtkflush(); - if ($mode eq 'mandrake_choices') { - foreach my $pkg (keys %$pkgs) { - my ($name) = split_fullname($pkg); - push @elems, [ $pkg, $_ ] foreach @{$compssUsers->{$name}}; - } - } else { + { my @keys = @filtered_pkgs; if (member($mode, qw(all_updates security bugfix normal))) { @keys = grep { diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index fda98c95..6388319b 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -53,7 +53,6 @@ our @EXPORT = qw( extract_header find_installed_version get_pkgs - parse_compssUsers_flat perform_installation perform_removal run_rpm); @@ -63,32 +62,6 @@ use ugtk2 qw(:all); use Gtk2::Pango; use Gtk2::Gdk::Keysyms; - -sub parse_compssUsers_flat() { - my (%compssUsers, $category); - my $compss = '/var/lib/urpmi/compssUsers.flat'; - -r $compss or $compss = '/usr/share/rpmdrake/compssUsers.flat.default'; - -r $compss or do { - print STDERR "No compssUsers.flat file found\n"; - return undef; - }; - foreach (cat_($compss)) { - s/#.*//; - /^\s*$/ and next; - if (/^\S/) { - if (/^(.+?) \[icon=.+?\] \[path=(.+?)\]/) { - $category = translate($2) . '|' . translate($1); - } else { - print STDERR "Malformed category in compssUsers.flat: <$_>\n"; - } - } elsif (/^\t(\d) (\S+)\s*$/) { - $category or print STDERR "Entry without category <$_>\n"; - push @{$compssUsers{$2}}, $category . ($1 <= 3 ? '|' . N("Other") : ''); - } - } - \%compssUsers; -} - sub run_rpm { foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) { local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} && $ENV{$_} !~ /UTF-8/; |