[Buildd-tools-devel] Bug#482804: sbuild: lvm-snapshot managed chroots uninstall packages after builds

Timothy G Abbott tabbott at MIT.EDU
Sun May 25 08:34:21 UTC 2008


Package: sbuild
Version: 0.57.3-1
Severity: normal

In using sbuild with the latest version of schroot, lvm-snapshot type 
chroots uninstall the dependencies that they installed, rather than 
allowing them to be removed by the LVM snapshot being destroyed.

The cause seems to be that the function sbuild::chroot::session_flags in 
schroot-1.2.0/sbuild/sbuild-chroot-source.cc is concluding that it should 
set the flags to CHROOT_SESSION_PURGE instead of CHROOT_SESSION_CLONE; but 
sbuild is checking for whether it is Session Cloned, not Session Purged. 
The documentation in the schroot code in sbuild::chroot::session_flags 
suggest that sbuild is checking the wrong field ('Session Cloned' rather 
than 'Session Purged') here, but I'm not entirely certain.

Below is the relevant schroot --info output.

 	-Tim Abbott

[tabbott at debuild schroot-1.2.0$] schroot --info --chroot lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   Session
   Name                   lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   Description            lenny-i386-sbuild
   Type                   lvm-snapshot
   Priority               3
   Users
   Groups                 root sbuild
   Root Users
   Root Groups            root sbuild
   Aliases
   Environment Filter     ^(BASH_ENV|CDPATH|ENV|HOSTALIASES|IFS|KRB5_CONFIG|KRBCONFDIR|KRBTKFILE|KRB_CONF|LD_.*|LOCALDOMAIN|NLSPATH|PATH_LOCALE|RES_OPTIONS|TERMINFO|TERMINFO_DIRS|TERMPATH)$
   Run Setup Scripts      true
   Run Execution Scripts  true
   Script Configuration   script-defaults
   Session Managed        true
   Session Cloned         false
   Session Purged         true
   Personality            linux32
   Mount Location         /var/lib/schroot/mount/lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   Path                   /var/lib/schroot/mount/lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   Mount Device           /dev/debuild/lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   Device                 /dev/debuild/lenny-i386-sbuild
   Mount Options          -o noatime
   Source Users
   Source Groups          root
   Source Root Users
   Source Root Groups
   LVM Snapshot Device    /dev/debuild/lenny-i386-sbuild-d1e5ad73-1bc6-4741-a774-3f4cd5118fd7
   LVM Snapshot Options   --size 4G






More information about the Buildd-tools-devel mailing list