We do in fact already take steps to ensure we don't call this when using LVM snapshots to avoid the exact issue that you've reported. However, it looks like in your case this is not working. As you can see, set_mount_device should be called for all chroot types /except/ lvm-snapshot (where the dynamic_cast<> will fail)...
sbuild::chroot_block_device_base::set_device():
/// @todo: This may not be appropriate for derived classes such as
/// lvm_snapshot, since re-setting the device could overwrite the
/// mount device.
chroot_facet_mountable::ptr pmnt
(get_facet<chroot_facet_mountable>());
#ifdef SBUILD_FEATURE_LVMSNAP
if (!dynamic_cast<chroot_lvm_snapshot *>(this))
#endif
pmnt->set_mount_device(this->device);
We do in fact already take steps to ensure we don't call this when using LVM snapshots to avoid the exact issue that you've reported. However, it looks like in your case this is not working. As you can see, set_mount_device should be called for all chroot types /except/ lvm-snapshot (where the dynamic_cast<> will fail)...
sbuild: :chroot_ block_device_ base::set_ device( ):
/// @todo: This may not be appropriate for derived classes such as facet_mountable ::ptr pmnt facet<chroot_ facet_mountable >()); FEATURE_ LVMSNAP cast<chroot_ lvm_snapshot *>(this)) >set_mount_ device( this->device) ;
/// lvm_snapshot, since re-setting the device could overwrite the
/// mount device.
chroot_
(get_
#ifdef SBUILD_
if (!dynamic_
#endif
pmnt-
and preprocessed:
void block_device_ base::set_ device (std::string const& device) device) )
chroot_
{
if (!is_absname(
throw error(device, DEVICE_ABS);
this->device = device;
chroot_ facet_mountable ::ptr pmnt facet<chroot_ facet_mountable >());
(get_
if (!dynamic_ cast<chroot_ lvm_snapshot *>(this))
pmnt- >set_mount_ device( this->device) ;
}