On Sun, Dec 13, 2009 at 09:36:18PM +0000, Roger Leigh wrote: > On Sun, Dec 13, 2009 at 04:12:37PM -0500, Evan Broder wrote: > > On Sun, Dec 13, 2009 at 2:33 PM, Roger Leigh <rle...@codelibre.net> wrote: > > > [Please could you not top-post. Thanks!] > > > > > > On Sun, Dec 13, 2009 at 01:57:15PM -0500, Evan Broder wrote: > > >> I checked out the repository, ran ./bootstrap, then debuild -S, then > > >> sbuild, then installed the resulting packages. I've rebooted since > > >> installing the packages just to make sure there's no state sticking > > >> around. > > > > > > I've put a copy of the sources and debian packages here: > > > http://www.codelibre.net/~rleigh/schroot/ > > > > > > Could you try them, or rebuild them as appropriate? > > > > > > I've verified they work for me. However, it looked from your > > > description that you might additionally be using filesystem > > > unions; is this the case? If so, please could you test without > > > a union to see if this works? > > > > > > If it's broken only when unions are enabled, there's some > > > issue writing out the session file when unions are enabled. > > > > I've tried with both your packages and mine - I get the same behavior, > > but you're right that it's only for union chroots. Without unions, > > schroot -b works on type=block-device chroots. > > > > However, union chroots of type=directory /do/ work - it's just a > > problem for chroots that are both union chroots and type=block-device. > > Thanks for checking. I'll have to have a further look to see what's > different between the two types.
It's actually a simple bug in the union code for block-device chroots. If enabled, it immediately returned, skipping the session file creation. The attached patch should amend this. Could you please give it a try and let me know if this fixes things up for you? Thanks, 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.
diff --git a/sbuild/sbuild-chroot-block-device.cc b/sbuild/sbuild-chroot-block-device.cc index fa8bbbe..542d73e 100644 --- a/sbuild/sbuild-chroot-block-device.cc +++ b/sbuild/sbuild-chroot-block-device.cc @@ -136,31 +136,31 @@ chroot_block_device::setup_lock (chroot::setup_type type, chroot_facet_union::const_ptr puni (base->get_facet<chroot_facet_union>()); assert(puni); - if (puni->get_union_configured()) - return; + if (!puni->get_union_configured()) #endif - - sbuild::device_lock dlock(this->device); - if (lock) - { - try - { - dlock.set_lock(lock::LOCK_EXCLUSIVE, 15); - } - catch (sbuild::lock::error const& e) - { - throw error(get_device(), DEVICE_LOCK, e); - } - } - else { - try + sbuild::device_lock dlock(this->device); + if (lock) { - dlock.unset_lock(); + try + { + dlock.set_lock(lock::LOCK_EXCLUSIVE, 15); + } + catch (sbuild::lock::error const& e) + { + throw error(get_device(), DEVICE_LOCK, e); + } } - catch (sbuild::lock::error const& e) + else { - throw error(get_device(), DEVICE_UNLOCK, e); + try + { + dlock.unset_lock(); + } + catch (sbuild::lock::error const& e) + { + throw error(get_device(), DEVICE_UNLOCK, e); + } } } }
signature.asc
Description: Digital signature