Merged from trunk 11041:11047
| 11042 | Ensure that that Scheduler._main_loop() doesn't return |
| zmedico | before the merge queue is empty. |
| 11043 | Remove redundant failed_packages check from |
| zmedico | Scheduler._main_loop() since it's now handled inside the |
| | _schedule() call. |
| 11044 | Add async execution support for pkg_preinst and |
| zmedico | pkg_postinst. This allows the scheduler's poll loop to run |
| | so that other parallel tasks aren't starved for output |
| | handling while pkg_preinst and pkg_postinst are executing. |
| 11045 | * Fix doebuild so "returnpid" works for preinst and |
| zmedico | postinst. * Add async support for pkg_prerm and pkg_postrm. |
| | * Add missing "treetype" parameter to dblink constructor |
| | calls. * Fix SubProcess._wait() to check self.returncode |
| | _after_ calling the scheduler. |
| 11046 | Call prepare_build_dirs() prior to pkg_preinst so that |
| zmedico | logging works properly. |
| 11047 | Unregister from poll() objects before closing file in order |
| zmedico | to hopefully avoid stale events that can trigger a KeyError |
| | in Scheduler._poll_loop() if the event's file descriptor no |
| | longer has a registered handler. |
svn path=/main/branches/prefix/; revision=11048