Unknown architecture on Open Indiana 'i86pc'

Bug #1118920 reported by Matt Jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raise
Fix Released
High
Unassigned

Bug Description

The raise_actual script uses platform.machine() to get the architecture. On most Intel x86 systems it returns 'i686' or 'x86_64'. But on Open Indiana it returns 'i86pc'. This breaks the setup.

Check what platform.processor() and platform.machine() return on different OSs.

Matt Jones (workhorsy)
description: updated
Revision history for this message
Matt Jones (workhorsy) wrote :
Download full text (3.2 KiB)

More output from different operating systems:

platform.machine():
[OS NAME] [Real CPU] [Python Version] [Reported CPU]
Android 4.1.1 ARM_7A Python 2.6: 'armv71'
Arch, x86_64, Python 3.3.0: 'x86_64'
Debian 6.0.6, x86_32, Python 2.7.3: 'i686'
Debian 7.0, x86_64, Python 2.7.3: 'x86_64'
Fedora 17, x86_32, Python 2.7.3: 'i686'
Fedora 18, x86_32, Python 2.7.3: 'i686'
Fedora 18, x86_64, Python 2.7.3: 'x86_64'
FreeBSD, x86_64, Python 2.7.3: 'amd64'
Gentoo 2.2, x86_64, Python 2.7.3: 'x86_64'
Mandrake 1 x86_32, Python 2.7.1: 'i686'
Open SUSE 12.1, x86_32, Python 2.7.2: 'i686'
Open Indiana 5.11, x86_32, Python 2.6.4: 'i86pc'
OpenBSD, x86_64, Python 2.7.3: 'amd64'
OpenBSD 5.2, x86_32, Python 2.7.3: 'i386'
PC BSD 9, x86_32, Python 2.7.2: 'i386'
Slackware 14, x86_64, Python 2.7.3: 'x86_64'
Ubuntu 12.04, x86_32, Python 2.7.3: 'i686'
Ubuntu 12.04, x86_64, Python 2.7.3: 'x86_64'
Ubuntu 12.10, x86_32, Python 2.7.3: 'i686'
Windows XP, x86_32, Python 2.7.3: 'x86'

platform.processor():
[OS NAME] [Real CPU] [Python Version] [Reported CPU]
Android 4.1.1 ARM_7A Python 2.6: ''
Arch, x86_64, Python 3.3.0: ''
Debian 6.0.6, x86_32, Python 2.7.3: ''
Debian 7.0, x86_64, Python 2.7.3: ''
Fedora 17, x86_32, Python 2.7.3: 'i686'
Fedora 18, x86_32, Python 2.7.3: 'i686'
Fedora 18, x86_64, Python 2.7.3: 'x86_64'
FreeBSD, x86_64, Python 2.7.3: 'amd64'
Gentoo 2.2 x86_64, Python 2.7.3: 'Intel(R) Core(TM) i7-3960X CPU @ 3.30GHz'
Mandrake 1 x86_32, Python 2.7.1: 'i686'
Open SUSE 12.1, x86_32, Python 2.7.2: 'i686'
Open Indiana 5.11, x86_32, Python 2.6.4: 'i386'
OpenBSD, x86_64, Python 2.7.3: 'amd64'
OpenBSD 5.2, x86_32, Python 2.7.3: 'i386'
PC BSD 9, x86_32, Python 2.7.2: 'i386'
Slackware 14, x86_64, Python 2.7.3: 'Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz'
Ubuntu 12.04, x86_32, Python 2.7.3: 'i686'
Ubuntu 12.04, x86_64, Python 2.7.3: 'x86_64'
Ubuntu 12.10, x86_32, Python 2.7.3: 'i686'
Windows XP, x86_32, Python 2.7.3: ...

Read more...

Revision history for this message
Matt Jones (workhorsy) wrote :

It looks like the problem is that:

A) platform.processor() is supposed to return the name of the CPU. But does not work in most cases. Sometimes it returns the CPU type. So it can be misleading.

B) platform.machines() just returns what the OS reports as the CPU type. Not the actual CPU type. So it can say anything from x86, i686, to i86pc

This looks like a design flaw in the Platform module. It won't get fixed for backwards compatibility reasons:

http://hg.python.org/cpython/file/2.7/Lib/platform.py#l1349

Revision history for this message
Matt Jones (workhorsy) wrote :
Changed in raise:
status: Confirmed → Fix Committed
Matt Jones (workhorsy)
Changed in raise:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.