On Fri, Apr 25, 2008 at 07:26:48PM +0400, martin f krafft wrote: > If an sbuild gets interrupted, the session is not ended as no > signals are trapped. sbuild should ensure that it cleans up any > schroot sessions on exit, if it can in any way (as is the case for > SIGINT).
The current sbuild (0.60.0/0.60.1) will end the session associated with the current job, so from this POV the bug is now fixed. It also rm -rf's the build directory. Now, while the bug (as reported) is not present in current sbuild's it's open to debate whether the current signal handling is adequate. While we clean up the build dir and end the session, we don't make /any/ attempt to leave the build chroot in a consistent state. We don't remove the build dependencies, and we don't do any other cleanup, e.g. srcdep-lock removal. If using snapshot-based schroot chroots, this is a non-issue: the cleanup occured when the session ended. For other types, manual cleanup with e.g. debfoster is needed. The chroot could be broken if interrupting at other critical moments, e.g. when running apt-get/dpkg. So the question is: if the user requested termination, do we terminate immediately, or do we do the cleanup necessary to leave everything ready for a new build? The cleanup could be expensive and take a long time, especially on slow systems where this might be part of the shutdown process. In the common case of terminating during a build, I think we cope fairly well, bar not removing the build-deps. At other points, termination is not a good plan. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature