Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 13578

Summary: eutils.eclass get_number_of_jobs wrong for UML
Product: Gentoo Linux Reporter: Mike Stok <mike>
Component: New packagesAssignee: Martin Schlemmer (RETIRED) <azarah>
Severity: normal CC: nall
Priority: High    
Version: 1.4_rc2   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: eutils.patch

Description Mike Stok 2003-01-09 10:17:44 UTC
in 1.12 eutils.eclass if I'm running an x86 architecture under UML then 
/proc/cpuinfo *does not* have a Processor: line in it and my -j option is
set incorrectly in get_number_of_jobs


  expr `grep -c '^processor' /proc/cpuinfo` + 1

be a better way to calculate the number of jobs?

This breaks lots of ebuilds...
Comment 1 Mike Stok 2003-01-09 10:39:15 UTC
Actually a little experimentation says that changing the * 2 to + 1 in

  export MAKEOPTS="${MAKEOPTS} -j$((`grep -c ^processor /proc/cpuinfo` * 2))"

seems to be the minimal change.  This gives 1 job on UML and nprocs + 1 on 
regular x86.
Comment 2 Mike Stok 2003-01-09 10:41:42 UTC
UML means I'm runnibg the gentoo in a User Mode Linux machine (there are at 
least 2 meanings of UML I'm aware of, sorry for any confusion)
Comment 3 Jonathan Nall 2003-01-10 08:53:44 UTC
not sure why my first reassign didn't work...
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-12 14:15:32 UTC
Created attachment 7227 [details, diff]

Have a look if this fixes it.  Also added some other stuff, nall please verify.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-12 14:16:32 UTC
Nall, have a look at comment #4.
Comment 6 Jonathan Nall 2003-01-12 14:47:11 UTC
looks great to me...
Comment 7 Mike Stok 2003-01-12 14:57:28 UTC
Seems OK to me - I got -j1 for my UML instance.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-17 02:08:19 UTC
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-19 13:33:13 UTC