aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-12 09:40:39 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-12 09:40:39 +0000
commit6ba17da2ed0430eea39cab733daf3403e613bf08 (patch)
tree131214f5fbc39e26b0d66435bdb857ab4fb46903
parentb5b33d79d83c212d2f5c83635f1c079c51c3879d (diff)
downloadrpmdrake-6ba17da2ed0430eea39cab733daf3403e613bf08.tar
rpmdrake-6ba17da2ed0430eea39cab733daf3403e613bf08.tar.gz
rpmdrake-6ba17da2ed0430eea39cab733daf3403e613bf08.tar.bz2
rpmdrake-6ba17da2ed0430eea39cab733daf3403e613bf08.tar.xz
rpmdrake-6ba17da2ed0430eea39cab733daf3403e613bf08.zip
add list of programs with GUI view (#36486)
-rw-r--r--Makefile6
-rw-r--r--Rpmdrake/gui.pm1
-rw-r--r--Rpmdrake/pkg.pm3
-rwxr-xr-xrpmdrake3
4 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b64a6e9c..972009ce 100644
--- a/Makefile
+++ b/Makefile
@@ -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,
};
diff --git a/rpmdrake b/rpmdrake
index cb71509e..c27178a1 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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')
} ],