diff options
author | Thierry Vignaud <tv@mageia.org> | 2011-09-07 18:04:10 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2011-09-07 18:04:10 +0000 |
commit | bbe8b9729e49501200342cf63acc1c5d71475710 (patch) | |
tree | f316440582f9a63cb483381109da95e6985a43e0 | |
parent | e73dab877d5fa907cee1af9b2381619f891024d8 (diff) | |
download | drakx-backup-do-not-use-bbe8b9729e49501200342cf63acc1c5d71475710.tar drakx-backup-do-not-use-bbe8b9729e49501200342cf63acc1c5d71475710.tar.gz drakx-backup-do-not-use-bbe8b9729e49501200342cf63acc1c5d71475710.tar.bz2 drakx-backup-do-not-use-bbe8b9729e49501200342cf63acc1c5d71475710.tar.xz drakx-backup-do-not-use-bbe8b9729e49501200342cf63acc1c5d71475710.zip |
(default_packages) merge cpufreq detection logic into
detect_devices::hasCPUFreq(), which is cleaner and enable us to install
cpufreq on more cases
-rw-r--r-- | perl-install/detect_devices.pm | 7 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/install/any.pm | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 49ed09cab..3ad459054 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1254,7 +1254,12 @@ sub hasCPUMicrocode() { return $hasCPUMicrocode; } -sub hasCPUFreq() { require cpufreq; to_bool(cpufreq::get_modules()) } +sub hasCPUFreq() { + require cpufreq; + to_bool(cpufreq::get_modules()) + || cat_('/proc/cpuinfo') =~ /AuthenticAMD/ && arch() =~ /x86_64/ + || cat_('/proc/cpuinfo') =~ /model name.*Intel\(R\) Core\(TM\)2 CPU/; +} sub hasWacom() { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() } sub hasTouchpad() { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() } sub hasNumpad() { any { $_->{Numpad} } getInputDevices() } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 1c2e3d88b..4da1eb0c3 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,5 +1,6 @@ - better microcode_ctl management - fix cpufreq detection corrupting other types +- install cpufreq on more cases Version 13.62 - 22 August 2011 diff --git a/perl-install/install/any.pm b/perl-install/install/any.pm index 623892693..8f90028c0 100644 --- a/perl-install/install/any.pm +++ b/perl-install/install/any.pm @@ -545,8 +545,7 @@ sub default_packages { push @l, "cryptsetup" if !is_empty_array_ref($o->{all_hds}{dmcrypts}); push @l, "dmraid" if any { fs::type::is_dmraid($_) } @{$o->{all_hds}{hds}}; push @l, "microcode_ctl" if detect_devices::hasCPUMicrocode(); - push @l, 'cpufreq' if cat_('/proc/cpuinfo') =~ /AuthenticAMD/ && arch() =~ /x86_64/ - || cat_('/proc/cpuinfo') =~ /model name.*Intel\(R\) Core\(TM\)2 CPU/; + push @l, 'cpufreq' if detect_devices::hasCPUFreq(); push @l, 'apmd' if -e "/proc/apm"; push @l, detect_devices::probe_name('Pkg'); |