[buildd-tools-devel] Bug#609658: sbuild: $purge_build_directory = 'never' results in schroot session not ended

Ansgar Burchardt ansgar at 2008.43-1.org
Tue Jan 11 10:36:00 UTC 2011


Package: sbuild
Version: 0.60.8-1
Severity: normal
Tags: upstream

I use sbuild with btrfs snapshots. With 0.60.6-1 I set
  $purge_build_directory = 'never'
as suggested in the changelog to avoid having to wait for removal of the build
directory (as it should be removed together with the snapshot anyway).

But this results in the schroot session not ending, that is I get one
more schroot session per build that I have to end manually.

The problematic code is in lib/Sbuild/Build.pm:

$purge_build_directory is set to 0 ('never'):

 545     my $purge_build_directory =
 546         ($self->get_conf('PURGE_BUILD_DIRECTORY') eq 'always' ||
 547          ($self->get_conf('PURGE_BUILD_DIRECTORY') eq 'successful' &&
 548           $self->get_status() eq 'successful')) ? 1 : 0;

Removal is skipped:

 556     if ($purge_build_directory) {
 ---         rm -rf $build_directory

However, $end_session is set to 0?!

 568     if ($is_cloned_session) {
 569         $self->log("Not cleaning session: cloned chroot in use\n");
 570         $end_session = 0
 571             if ($purge_build_directory == 0 || $purge_build_deps == 0);
 572     } else {

And the session is kept open:

 588     if ($end_session == 1) {
 589         $session->end_session();
 590     } else {
 591         $self->log("Keeping session: " . $session->get('Session ID') . "\n");
 592     }

Regards,
Ansgar

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (900, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sbuild depends on:
ii  adduser                       3.112+nmu2 add and remove users and groups
ii  libsbuild-perl                0.60.8-1   Tool for building Debian binary pa
ii  perl                          5.10.1-16  Larry Wall's Practical Extraction 
ii  perl-modules                  5.10.1-16  Core Perl modules

Versions of packages sbuild recommends:
ii  debootstrap                   1.0.26     Bootstrap a basic Debian system
ii  fakeroot                      1.14.4-1   Gives a fake root environment

Versions of packages sbuild suggests:
pn  deborphan                     <none>     (no description available)
ii  wget                          1.12-2.1   retrieves files from the web

-- Configuration Files:
/etc/sbuild/sbuild.conf changed [not included]
/etc/schroot/buildd/fstab changed [not included]
/etc/schroot/buildd/nssdatabases changed [not included]

-- no debconf information





More information about the Buildd-tools-devel mailing list