A base class for block-device chroots. More...
#include <sbuild-chroot-block-device-base.h>


Public Member Functions | |
| virtual | ~chroot_block_device_base () |
| The destructor. | |
| std::string const & | get_device () const |
| Get the block device of the chroot. | |
| void | set_device (std::string const &device) |
| Set the block device of the chroot. | |
| virtual std::string | get_path () const |
| Get the path to the chroot. | |
| std::string const & | get_chroot_type () const |
| Get the type of the chroot. | |
| virtual void | setup_env (chroot const &chroot, environment &env) const |
| virtual session_flags | get_session_flags (chroot const &chroot) const |
Protected Member Functions | |
| chroot_block_device_base () | |
| The constructor. | |
| chroot_block_device_base (const chroot_block_device_base &rhs) | |
| The copy constructor. | |
| virtual void | get_details (chroot const &chroot, format_detail &detail) const |
| virtual void | get_keyfile (chroot const &chroot, keyfile &keyfile) const |
| virtual void | set_keyfile (chroot &chroot, keyfile const &keyfile, string_list &used_keys) |
Protected Attributes | |
| std::string | device |
| The block device to use. | |
Friends | |
| class | chroot |
A base class for block-device chroots.
This class doesn't implement a chroot (get_chroot_type is not implemented).
Originally lvm-snapshot inherited from the block-device chroot, but this was changed when union support was introduced. This design prevents lvm-snapshot offering union based sessions.
| chroot_block_device_base::chroot_block_device_base | ( | ) | [protected] |
The constructor.
References sbuild::chroot::add_facet(), and sbuild::chroot_facet_mountable::create().
| chroot_block_device_base::chroot_block_device_base | ( | const chroot_block_device_base & | rhs | ) | [protected] |
| chroot_block_device_base::~chroot_block_device_base | ( | ) | [virtual] |
The destructor.
| std::string const & chroot_block_device_base::get_chroot_type | ( | ) | const [virtual] |
Get the type of the chroot.
Implements sbuild::chroot.
Reimplemented in sbuild::chroot_lvm_snapshot.
| void chroot_block_device_base::get_details | ( | chroot const & | chroot, | |
| format_detail & | detail | |||
| ) | const [protected, virtual] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
References sbuild::format_detail::add(), device, and get_device().
| std::string const & chroot_block_device_base::get_device | ( | ) | const |
Get the block device of the chroot.
References device.
Referenced by get_details(), get_keyfile(), setup_env(), sbuild::chroot_lvm_snapshot::setup_lock(), and sbuild::chroot_block_device::setup_lock().
| void chroot_block_device_base::get_keyfile | ( | chroot const & | chroot, | |
| keyfile & | keyfile | |||
| ) | const [protected, virtual] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
References get_device(), sbuild::chroot::get_keyfile_name(), and sbuild::basic_keyfile< K, P >::set_object_value().
| std::string chroot_block_device_base::get_path | ( | ) | const [virtual] |
Get the path to the chroot.
This is the absolute path to the root of the chroot, and is typically the same as the mount location and location concatenated together, but is overridden by the chroot type if required.
Implements sbuild::chroot.
References sbuild::chroot::get_mount_location().
| sbuild::chroot::session_flags chroot_block_device_base::get_session_flags | ( | chroot const & | chroot | ) | const [virtual] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
References sbuild::chroot::SESSION_NOFLAGS.
| void chroot_block_device_base::set_device | ( | std::string const & | device | ) |
Set the block device of the chroot.
This is the "source" device. It may be the case that the real device is different (for example, an LVM snapshot PV), but by default will be the device to mount.
| device | the device. |
References sbuild::chroot::DEVICE_ABS, and sbuild::is_absname().
Referenced by set_keyfile().
| void chroot_block_device_base::set_keyfile | ( | chroot & | chroot, | |
| keyfile const & | keyfile, | |||
| string_list & | used_keys | |||
| ) | [protected, virtual] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
References sbuild::chroot::get_keyfile_name(), sbuild::basic_keyfile< K, P >::get_object_value(), sbuild::keyfile_base::PRIORITY_REQUIRED, and set_device().
| void chroot_block_device_base::setup_env | ( | chroot const & | chroot, | |
| environment & | env | |||
| ) | const [virtual] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
References sbuild::environment::add(), and get_device().
friend class chroot [friend] |
Reimplemented in sbuild::chroot_block_device, and sbuild::chroot_lvm_snapshot.
std::string sbuild::chroot_block_device_base::device [protected] |
The block device to use.
Referenced by chroot_block_device_base(), get_details(), get_device(), sbuild::chroot_lvm_snapshot::setup_lock(), and sbuild::chroot_block_device::setup_lock().
1.6.1