[Pkg-bazaar-maint] Bug#647690: bzr: FTBFS(kfreebsd): NotImplementedError: cannot determine number of cpus

Jelmer Vernooij jelmer at debian.org
Mon Nov 7 15:10:58 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/11/11 12:21, Robert Millan wrote:
> 2011/11/5 Christoph Egger <christoph at debian.org>:
>> File
"/build/buildd-bzr_2.4.2-1-kfreebsd-amd64-jZoBIh/bzr-2.4.2/build/lib.gnukfreebsd-8.1-1-amd64-x86_64-2.7/bzrlib/osutils.py",
line 2322, in local_concurrency
>> concurrency = multiprocessing.cpu_count()
>> File "/usr/lib/python2.7/multiprocessing/__init__.py", line 136, in
cpu_count
>> raise NotImplementedError('cannot determine number of cpus')
>> NotImplementedError: cannot determine number of cpus
>
> I don't know how to do this in python, but in case it helps you can
> obtain the number of cpus via { CTL_HW, HW_NCPU } sysctl:
>
> $ sysctl hw.ncpu
> hw.ncpu: 2
We already have a fallback mechanism for older versions of Python that
don't provide the multiprocessing module. I'll make
bzrlib.osutils.local_concurrency() fall back to that if
multiprocessing.cpu_count() raises NotImplementedError.

Arguably this is also a bug in Python, because it should be able to
provide the CPU count on Debian GNU/kFreeBSD.

Thanks for the bug report and useful suggestions.

Cheers,

Jelmer

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOt/UCAAoJEACAbyvXKaRXd8sP/3viGCgB+8KjhJEIK3rSfeYM
fGwl+ENp6yuIfAaoXcDyO8b2Lzyd7KNqmjYm53HBsqW6hF/UwJm375U/GSAhRAa+
K4fPAVJRIlgxwzvSPI/WVwAPSzByCwxz8et2VEKyUwVH1lEjU4NBq5LNHtD+OgjL
LXgnZCaUiqloP1JKPtvgvto1Fjoea8XJla8KeyH31PfK+hVT3+FEMvv/ExYYRJXC
YvsNWpSvtdQMS8Yj0ahJ9IPDtuBycaIDvs2y1YjerykV1TsPyMInHE5PjmdOL36J
kAw5K+GftjppDxDAN5zt1rtPJEdad2iW17Fl1KHBoWEVVX8yhA8wkzJdVXhTzdem
zI407H192RdoDikryBsRkvEy8nn4CvFdz4H2uOe8Tr6h50fEgbfUrZEsgS18p09E
/ad97D1dGdsh+ZKC59bawV73BKB9jTiadMVrCIrk6v6B2vnHOVj7oX3RWSyMHLYC
MpS1ooN789pYCNRC/K45UyKC+ku12pvylpH55dQnjeTkX56crARYDPnQJ/jHTGbw
wnOZUEzDVfgxP03Ta3VkwEhMgLBLDaUH+iKquyP62kkRScE2w4dGH48XKo7+WTmT
rDiqwhSuC2D9QxxdrHJ/p5XMrhVpun7UBfk9lhRdQtvoRKTt2KZna3sL9DKv0HU4
urBWJV3TgiB+NCMWkjFt
=ku1p
-----END PGP SIGNATURE-----






More information about the Pkg-bazaar-maint mailing list