aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-01-05 19:37:32 -0500
committerJack Lloyd <[email protected]>2017-01-05 19:37:32 -0500
commita1d25be46c86f37ad1b6b6cf00ee18b2f7dd5456 (patch)
tree878c8731cf39a457fb354f472a07dbb2ceb64d13
parent194bf02ec1c1a5abb9f5767d26d898810658ec34 (diff)
Use /proc/cpuinfo only as last resort for now
Possible misdetection issues, and it hasn't been well tested yet.
-rwxr-xr-xconfigure.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.py b/configure.py
index c9fb3b755..8690957aa 100755
--- a/configure.py
+++ b/configure.py
@@ -1151,6 +1151,12 @@ def system_cpu_info():
cpu_info = []
+ if platform.machine() != '':
+ cpu_info.append(platform.machine())
+
+ if platform.processor() != '':
+ cpu_info.append(platform.processor())
+
try:
with open('/proc/cpuinfo') as f:
for line in f.readlines():
@@ -1159,18 +1165,14 @@ def system_cpu_info():
# Different Linux arch use different names for this field in cpuinfo
if key in ["model name", "cpu model", "Processor"]:
+ val = ' '.join(val.split())
+ logging.debug('Found CPU model "%s" in /proc/cpuinfo' % (val))
cpu_info.append(val)
break
except IOError:
pass
- if platform.machine() != '':
- cpu_info.append(platform.machine())
-
- if platform.processor() != '':
- cpu_info.append(platform.processor())
-
return cpu_info
def guess_processor(archinfo):
@@ -1759,7 +1761,7 @@ def choose_modules_to_use(modules, module_policy, archinfo, ccinfo, options):
cannot_use_because(modname, 'dependency failure')
for not_a_dep in maybe_dep:
- cannot_use_because(not_a_dep, 'only used if needed or requested')
+ cannot_use_because(not_a_dep, 'not requested')
for reason in sorted(not_using_because.keys()):
disabled_mods = sorted(set([mod for mod in not_using_because[reason]]))