summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-06 02:33:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-06 02:33:34 +0000
commitc38c9f5251520a73979936af6ef1c719ed0c3954 (patch)
tree6dadf62994e6c3da18152a92758eff7201d73cc0
parent9993d2565f25d641fe59a858504c6587fb8bcf36 (diff)
downloaddrakx-c38c9f5251520a73979936af6ef1c719ed0c3954.tar
drakx-c38c9f5251520a73979936af6ef1c719ed0c3954.tar.gz
drakx-c38c9f5251520a73979936af6ef1c719ed0c3954.tar.bz2
drakx-c38c9f5251520a73979936af6ef1c719ed0c3954.tar.xz
drakx-c38c9f5251520a73979936af6ef1c719ed0c3954.zip
make a special "low resources" choice
-rw-r--r--perl-install/detect_devices.pm4
-rw-r--r--perl-install/share/compssUsers.pl9
-rw-r--r--perl-install/share/rpmsrate5
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