Gentoo Archives: gentoo-portage-dev

From: Brian <dol-sen@×××××.net>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] emerge threaded
Date: Tue, 25 Apr 2006 02:53:29
Message-Id: 1145933717.14148.166.camel@localhost
In Reply to: [gentoo-portage-dev] emerge threaded by Tom Hosiawa
1 On Mon, 2006-24-04 at 22:09 -0400, Tom Hosiawa wrote:
2 > I'm trying to setup my superkaramba theme to have the emerge module
3 > being threaded so the gui is still responsive while it's checking for
4 > updates. But I'm running into this error
5 >
6 > Unhandled exception in thread started by <function main at 0xb68f356c>
7 > Traceback (most recent call last):
8 > File "portage_engine.py", line 29, in main
9 > reload(portage)
10 > File "/usr/lib/portage/pym/portage.py", line 132, in ?
11 > signal.signal(signal.SIGCHLD, signal.SIG_DFL)
12 > ValueError: signal only works in main thread
13 >
14 > >From what I've found so far, I basically won't be able to do this
15 > because of the signal calls in portage.py. I'm just wondering if
16 > anybody of anything else I could try or a work around to allow me to
17 > thread the emerge module?
18 > --
19 > Tom
20 >
21
22 >From our experience in porthole portage does not like to be threaded.
23 There are a number of environment variables and things that are not
24 preserved for portage/emerge to spawn additional processes. We also
25 limit what we do thread for info gathering.
26
27 That is why in porthole we use an imported portage for information
28 gathering, but for installs/sync/unmerge we spawn a new process and call
29 emerge with normal cammand line arguments.
30
31
32 That however could change for the next major version of portage. I have
33 not attempted to try an internal build in the imported pkgcore, but it
34 may well work ok. That is something that is yet to be tested. Brian
35 Harring does not know how pkgcore will handle being threaded. It is too
36 early in it's development.
37
38 --
39 Brian <dol-sen@×××××.net>
40
41 --
42 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] emerge threaded Brian Harring <ferringb@×××××.com>