Bug 1246040 - Change architecture detection on CentOS; r=glandium

This fails under Docker otherwise. platform.architecture() uses the
architecture of the Python executable, which should be fine assuming the
system-installed Python is being used. Even if the user installed their
own Python, running a 32-bit Python on a 64-bit system feels like
something that would be extremely rare.

DONTBUILD (NPOTB)

--HG--
extra : commitid : HowMKbWsoTt
extra : amend_source : 9c6fd75da6d521845d561e04350b2e82dccf2b38
This commit is contained in:
Gregory Szorc 2016-02-05 10:51:41 -08:00
parent c52ba119a6
commit 460386b9c1

View File

@ -54,9 +54,8 @@ class CentOSBootstrapper(BaseBootstrapper):
self.dnf_groupinstall(*self.browser_group_packages)
self.dnf_install(*self.browser_packages)
kern = platform.uname()
yasm = 'http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el6.rf.i686.rpm'
if 'x86_64' in kern[2]:
if platform.architecture()[0] == '64bit':
yasm = 'http://pkgs.repoforge.org/yasm/yasm-1.1.0-1.el6.rf.x86_64.rpm'
self.run_as_root(['rpm', '-ivh', yasm])