diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Rpmdrake/gui.pm | 1 | ||||
-rw-r--r-- | Rpmdrake/pkg.pm | 3 | ||||
-rwxr-xr-x | rpmdrake | 3 |
4 files changed, 11 insertions, 2 deletions
@@ -11,7 +11,7 @@ RELATIVE_SBIN = ../sbin RPM=$(shell rpm --eval %_topdir) PERL_VENDORLIB=$(DESTDIR)/$(shell perl -V:installvendorlib | perl -pi -e "s/.*=//; s/[;']//g") -all: dirs +all: dirs gui.lst dirs: @for n in . $(DIRS); do \ @@ -39,6 +39,7 @@ install: $(ALL) ln -sf $(RELATIVE_SBIN)/drakrpm-update $(BINDIR)/drakrpm-update install -d $(DATADIR)/rpmdrake/icons install -m644 icons/*.png $(DATADIR)/rpmdrake/icons + install -m644 gui.lst $(DATADIR)/rpmdrake install -m644 compssUsers.flat.default $(DATADIR)/rpmdrake mkdir -p $(PERL_VENDORLIB)/Rpmdrake install -m 644 rpmdrake.pm $(PERL_VENDORLIB) @@ -58,6 +59,9 @@ dis: clean lzma ../$(NAME)-$(VERSION).tar rm -rf $(NAME)-$(VERSION) +gui.lst: + urpmf "/usr/share/applications/.*.desktop" |sed -e 's!:.*!!' |sort|uniq>gui.lst + .PHONY: ChangeLog log changelog log: ChangeLog diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index 22918fbb..fb712039 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -469,6 +469,7 @@ sub pkgs_provider { }, backports => sub { @filtered_pkgs = @{$h->{backports}} }, meta_pkgs => sub { @filtered_pkgs = @{$h->{meta_pkgs}} }, + gui_pkgs => sub { @filtered_pkgs = @{$h->{gui_pkgs}} }, ); foreach my $importance (qw(bugfix security normal)) { $filter_methods{$importance} = sub { diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 7860b6f8..791eb872 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -476,6 +476,8 @@ sub get_pkgs { # urpmi only care about the first medium where it found the package, # so there's no need to list the same package several time: @installable_pkgs = uniq(difference2(\@installable_pkgs, \@updates)); + + my @gui_pkgs = map { chomp; $_ } cat_('/usr/share/rpmdrake/gui.lst'); +{ urpm => $urpm, all_pkgs => \%all_pkgs, @@ -483,6 +485,7 @@ sub get_pkgs { installable => \@installable_pkgs, updates => \@updates, meta_pkgs => [ grep { /^task-/ } keys %all_pkgs ], + gui_pkgs => [ grep { member(($all_pkgs{$_}{pkg}->fullname)[0], @gui_pkgs) } keys %all_pkgs ], update_descr => $update_descr, backports => \@backports, }; @@ -322,6 +322,7 @@ sub run_treeview_dialog { #-PO: See http://wiki.mandriva.com/en/Policies/SoftwareMedia#.2Fmain.2Fbackports N("Backports")) : ()), meta_pkgs => N("Meta packages"), + gui_pkgs => N("Packages with GUI"), all_updates => N("All updates"), security => N("Security updates"), bugfix => N("Bugfixes updates"), @@ -344,7 +345,7 @@ sub run_treeview_dialog { my $cbox = gtksignal_connect( Gtk2::ComboBox->new_with_strings([ @modes{'all', if_($compssUsers, 'mandrake_choices'), - qw(meta_pkgs installed non_installed all_updates security bugfix normal), + qw(meta_pkgs gui_pkgs installed non_installed all_updates security bugfix normal), if_($is_backports, 'backports') } ], |