From c38c9f5251520a73979936af6ef1c719ed0c3954 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 6 Jun 2005 02:33:34 +0000 Subject: make a special "low resources" choice --- perl-install/detect_devices.pm | 4 ++++ perl-install/share/compssUsers.pl | 9 +++++++-- perl-install/share/rpmsrate | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 34541e024..15f671670 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -441,6 +441,10 @@ sub getCPUs() { @cpus; } +sub ix86_cpu_frequency() { + cat_('/proc/cpuinfo') =~ /cpu MHz\s*:\s*(\d+)/ && $1; +} + sub getSoundDevices() { modules::probe_category('multimedia/sound'); } diff --git a/perl-install/share/compssUsers.pl b/perl-install/share/compssUsers.pl index 64e5373ca..026816a69 100644 --- a/perl-install/share/compssUsers.pl +++ b/perl-install/share/compssUsers.pl @@ -3,6 +3,7 @@ package tmp::compssUsers; use common; use ugtk2 qw(:helpers :wrappers :create); +my $low_resources = availableRamMB() < 100 || detect_devices::ix86_cpu_frequency() < 450; my $meta_class = $::o->{meta_class}; my $desktop = $meta_class eq 'desktop'; my $powerpack = $meta_class eq 'powerpack'; @@ -146,14 +147,18 @@ N_("Graphical Environment") => { label => N_("KDE Workstation"), descr => N_("The K Desktop Environment, the basic graphical environment with a collection of accompanying tools"), flags => [ qw(KDE X ACCESSIBILITY) ], - default_selected => 1, + default_selected => !$low_resources, }, { label => N_("GNOME Workstation"), descr => N_("A graphical environment with user-friendly set of applications and desktop tools"), flags => [ qw(GNOME X ACCESSIBILITY) ], }, + { label => N_("IceWm Desktop"), + flags => [ qw(ICEWM X ACCESSIBILITY) ], + default_selected => $low_resources, + }, { label => N_("Other Graphical Desktops"), - descr => N_("Icewm, Window Maker, Enlightenment, Fvwm, etc"), + descr => N_("Window Maker, Enlightenment, Fvwm, etc"), flags => [ qw(GRAPHICAL_DESKTOP X ACCESSIBILITY) ], }, ], diff --git a/perl-install/share/rpmsrate b/perl-install/share/rpmsrate index 3d50d2265..70013386d 100644 --- a/perl-install/share/rpmsrate +++ b/perl-install/share/rpmsrate @@ -3,8 +3,11 @@ CAT_LSB 5 lsb +CAT_ICEWM + 4 icewm + CAT_GRAPHICAL_DESKTOP - 4 WindowMaker icewm + 4 WindowMaker 3 epplets blackbox enlightenment ethemes icepref xfce 2 wmnet 1 lesstif-mwm -- cgit v1.2.1