Neil Bothwick wrote:
On Thu, 27 Jan 2011 07:12:24 +0200, Nikos Chantziaras wrote:

I'm aware that portage uses locking mechanism before modifying 'world'
file, but what about the actual building process ? I'd expect emerge
to check if dependency package is already build/installed (or
currently being build by another instance) and just skip it in this
case, however I haven't tried it yet.. Can anybody shred some light
on this ?
You can try, but the second instance with simply block until the lock
has been removed.
The lock is not there for the entire emerge, I have run two emerges at
the same time, such as when I needed to install something while a world
update is in progress. It is possible, but not recommended as a general
strategy. That's what --jobs is for.



I have done the same thing and as long as the dependencies don't clash, it works fine. However, if you start one emerge with a set of dependencies, then start another and they clash somewhere in the middle, portage has issues. That is where the locks would kick in I guess. I would also imagine that portage could emerge the same package twice too. If one instance of emerge doesn't know what the other instance has already done, then the second one could emerge it again. Doesn't emerge do all the calculating at the beginning and runs with that until the end?

I am using the -j option for the first time now. I'm updating KDE. It seems to work fine. It doesn't scroll all the stuff like with a regular emerges but this new rig is so fast, I can't read it anyway. I did have a package to fail and it spit out the error for me to read.

I agree, using --jobs is the best way to do this. It works really well if you have a fast multi-core CPU. I wish I had got me a 6 core one now. ;-)

Dale

:-)  :-)

Reply via email to