summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
Commit message (Collapse)AuthorAgeFilesLines
* SubProcess._waitpid_cb: fix args for glib compatZac Medico2012-02-171-1/+1
|
* SubProcess: use child_watch_addZac Medico2012-02-161-29/+7
| | | | | This fixes performance issues introduced by commit 9c664779a16f6cbca8a5ffe7f6b0c68572819723.
* EventLoop: implement child_watch_addZac Medico2012-02-161-1/+3
|
* SubProcess: use non-blocking waitpidZac Medico2012-02-151-12/+27
| | | | | This ensures that the EventLoop will not stop due to a waitpid call blocking forever.
* Comment about _setup_pipes / PyPy GC interaction.Zac Medico2012-02-151-1/+5
|
* SpawnProcess: use os.open for /dev/null inputZac Medico2012-02-151-3/+3
|
* Scheduler: PyPy WeakValueDictionary.pop KeyErrorZac Medico2012-02-141-1/+8
| | | | | | | KeyError observed from WeakValueDictionary.pop() with PyPy 1.8, despite None given as default. Note that PyPy 1.8 has the same WeakValueDictionary code as CPython 2.7, so it may be possible for CPython to raise KeyError here as well.
* SpawnProcess: for stdout use os.write, not fdopenZac Medico2012-02-141-6/+5
|
* SubProcess._wait: add debug code for bug #403697Zac Medico2012-02-141-0/+6
|
* Assert that fork returns int for bug 403697.Zac Medico2012-02-141-0/+3
| | | | | These cases should have been included with commit 6a94a074aa0475173a51f3f726377d4c407e986b.
* AsynchronousTask: skip cancelled check in _startZac Medico2012-02-142-6/+0
| | | | | These checks should be irrelevant, since the cancel() method is never called on anything that hasn't been started already.
* After python fork, don't close fds for PyPy 1.8.Zac Medico2012-02-141-1/+5
| | | | | | | | | | | | | | | | If we close all open file descriptors after a fork, with PyPy 1.8 it triggers "[Errno 9] Bad file descriptor" later in the subprocess. Apparently it is holding references to file descriptors and closing them after they've already been closed and re-opened for other purposes. As a workaround, we don't close the file descriptors, so that they won't be re-used and therefore we won't be vulnerable to this kind of interference. The obvious caveat of not closing the fds is that the subprocess can hold locks that belonged to the parent process, even after the parent process has released the locks. Hopefully this won't be a major problem though, since the subprocess has to exit at release the lock eventually, when the EbuildFetcher or _MergeProcess task is complete.
* AsynchronousTask: don't wait for exit statusZac Medico2012-02-138-11/+29
| | | | | | Synchronous waiting for status is not supported, since it would be vulnerable to hitting the recursion limit when a large number of tasks need to be terminated simultaneously, like in bug #402335.
* PollScheduler: use idle_add to check terminationZac Medico2012-02-122-22/+41
| | | | | | | | | This fixes a regression in termination signal handling since commit 8c1fcf5a9ba9fa4d406a4d0cc284fe73a84f5a63, which cause termination signals to be ignored until a running job had exited. This regression is not really noticeable for Ctrl-C handling, since in that case the SIGINT propagets to subprocesses, causing them to exit and trigger a _schedule() call whichtriggers a termination check.
* Scheduler: simplify _sched_iface constructionv2.2.0_alpha86Zac Medico2012-02-111-14/+3
|
* EbuildIpcDaemon: handle POLLHUP, bug #401919Zac Medico2012-02-111-0/+24
|
* AbstractPollTask: merge _wait from subclassZac Medico2012-02-112-12/+6
|
* QueueScheduler: tweak run loop logicZac Medico2012-02-111-5/+5
|
* MetadataRegen: use porttreesZac Medico2012-02-111-1/+4
|
* _emerge.MetadataRegen.MetadataRegen._iter_metadata_processes():Arfrever Frehtes Taifersar Arahesis2012-02-111-21/+23
| | | | Regenerate metadata for given cpv in each repository.
* PollScheduler: return None from _schedule_tasksZac Medico2012-02-113-15/+12
| | | | The _keep_scheduling() template method is used instead.
* QueueScheduler: timeout compat for GlibEventLoopZac Medico2012-02-111-10/+19
| | | | | | | | Raising StopIteration doesn't work with GlibEventLoop, since it catches all exceptions and logs them. So, just use a boolean expression to terminate the while loop. This depends on commit dcb9fab8463996542d06d29bc383f5933bf0d677 so that IpcDaemonTestCase timeouts work correctly with both EventLoop and GlibEventLoop.
* display_autounmask: highlight config changesZac Medico2012-02-101-4/+12
| | | | | | As suggested here: http://archives.gentoo.org/gentoo-dev/msg_06a47ad55977f4d16bfe18769c6c38b8.xml
* PollScheduler: add generic _main_loop()Zac Medico2012-02-104-27/+30
|
* Scheduler: cleanup timeout after _main_loopZac Medico2012-02-101-2/+3
| | | | | The way we don't leave an leak a reference to the Scheduler instance in the global EventLoop instance.
* EbuildMerge: add exit_hook to unlock build dirZac Medico2012-02-103-5/+7
| | | | | | | | This is needed since commit 7a6c34cc6bd6eb20a97e05347f87a0157f4ae58a in order to ensure that the build dir is unlocked before exit listeners are called. It fixes failures in catalyst stage 1 builds where two instances of the same package, built sequentially for separate roots, interfere with eachother's build dir lock.
* Use IO_* constants where appropriate.Zac Medico2012-02-096-19/+35
|
* Add global_event_loop() and GlibEventLoop.Zac Medico2012-02-091-2/+2
| | | | | | This causes all PollScheduler instances within a given process to share a singleton EventLoop instance, and also makes it possible to swap in glib's main loop for all portage event loops in the main process.
* AsynchronousTask: exit listeners reverse orderZac Medico2012-02-091-1/+5
| | | | | | This should fix a Scheduler hang which is triggered when that merge queue, a SequentialTaskQueue, doesn't decrement its merge count until after other exit listeners have already run.
* QueueScheduler: fix for IpcDaemonTestCaseZac Medico2012-02-091-1/+3
| | | | | Use a StopIteration exception to jump out of EventLoop.iterate() before the poll loop.
* Move EventLoop to a separate file.Zac Medico2012-02-081-366/+1
|
* Use AbstractPollTask._wait_loop() more.Zac Medico2012-02-083-13/+4
|
* PollScheduler: remove _poll_loopZac Medico2012-02-083-33/+13
| | | | | We can use iteration() instead, and _poll_loop's exit behavior doesn't seem practical to emulate with glib.MainLoop.
* PollScheduler: remove EventLoop._schedule hookZac Medico2012-02-081-12/+5
| | | | | PollScheduler and subclasses be should already be calling self._schedule() when necessary.
* Scheduler: tweak _add_prefetchersZac Medico2012-02-081-8/+6
| | | | | Since commit 4620d6aba1c5c10344e311585516ee43819b703c, the first prefetcher is started as soon as it's added to the task queue.
* SequentialTaskQueue: use finally for _schedulingZac Medico2012-02-081-33/+13
| | | | Also, remove unecessary _dirty flag.
* SequentialTaskQueue: schedule automaticallyZac Medico2012-02-082-8/+11
| | | | | | | This is needed to compensate for the removal of _idle_schedule in commit 8c1fcf5a9ba9fa4d406a4d0cc284fe73a84f5a63, so that the Scheduler's task queues operate without needing their schedule methods called inside Scheduler._schedule_tasks().
* Scheduler: remove _idle_scheduleZac Medico2012-02-081-5/+0
| | | | | This shouldn't be needed, since _schedule() should already be called automatically when there are any relevant state changes.
* EventLoop: use same method names as glibZac Medico2012-02-082-23/+23
|
* PollScheduler: don't inherit EventLoopZac Medico2012-02-084-28/+30
|
* PollScheduler: split out EventLoop base classZac Medico2012-02-081-106/+116
|
* AbstractPollTask: use timeout_addZac Medico2012-02-071-14/+11
|
* QueueScheduler: tweak timeout handlingZac Medico2012-02-071-13/+14
|
* PollScheduler: remove _schedule_waitZac Medico2012-02-072-48/+2
|
* QueueScheduler: use timeout_addZac Medico2012-02-071-34/+17
|
* AbstractPollTask: add _wait_loop methodZac Medico2012-02-072-6/+25
|
* Use PollScheduler iteration method.Zac Medico2012-02-075-17/+17
|
* PollScheduler: add iteration methodZac Medico2012-02-072-12/+27
|
* Scheduler: use idle_add, not _poll overrideZac Medico2012-02-071-2/+4
|
* PollScheduler: implement idle_addZac Medico2012-02-071-1/+45
|