#include <sbuild-chroot-mountable.h>


Public Member Functions | |
| virtual | ~chroot_mountable () |
| The destructor. | |
| virtual std::string const & | get_mount_device () const =0 |
| Get the mount device of the chroot. | |
| std::string const & | get_mount_options () const |
| Get the filesystem mount_options of the chroot block device. | |
| void | set_mount_options (std::string const &mount_options) |
| Set the filesystem mount_options of the chroot block device. | |
| virtual std::string const & | get_location () const |
| Get the location. | |
| virtual void | set_location (std::string const &location) |
| Set the location. | |
| virtual void | setup_env (environment &env) |
| Set environment. | |
| virtual session_flags | get_session_flags () const |
| Get the session flags of the chroot. | |
Protected Member Functions | |
| chroot_mountable () | |
| The constructor. | |
| virtual void | get_details (format_detail &detail) const |
| Get detailed information about the chroot for output. | |
| virtual void | get_keyfile (keyfile &keyfile) const |
| Copy the chroot properties into a keyfile. | |
| virtual void | set_keyfile (keyfile const &keyfile, string_list &used_keys) |
| Set the chroot properties from a keyfile. | |
Private Attributes | |
| std::string | mount_options |
| The options to mount the device with. | |
Friends | |
| class | chroot |
The device will be mounted on demand.
| chroot_mountable::chroot_mountable | ( | ) | [protected] |
The constructor.
| chroot_mountable::~chroot_mountable | ( | ) | [virtual] |
The destructor.
| void chroot_mountable::get_details | ( | format_detail & | detail | ) | const [protected, virtual] |
Get detailed information about the chroot for output.
| detail | the details to output to. |
Reimplemented from sbuild::chroot.
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
References sbuild::format_detail::add(), get_mount_options(), and mount_options.
| void chroot_mountable::get_keyfile | ( | keyfile & | keyfile | ) | const [protected, virtual] |
Copy the chroot properties into a keyfile.
The keyfile group with the name of the chroot will be set; if it already exists, it will be removed before setting it.
| keyfile | the keyfile to use. |
Reimplemented from sbuild::chroot.
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
References get_location(), get_mount_options(), sbuild::chroot::get_name(), and sbuild::basic_keyfile< K, P >::set_object_value().
| std::string const & chroot_mountable::get_location | ( | ) | const [virtual] |
Get the location.
This is a path to the chroot directory inside the device (absolute path from the device root).
Reimplemented from sbuild::chroot.
Referenced by get_keyfile().
| virtual std::string const& sbuild::chroot_mountable::get_mount_device | ( | ) | const [pure virtual] |
Get the mount device of the chroot.
Reimplemented from sbuild::chroot.
Implemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
| std::string const & chroot_mountable::get_mount_options | ( | ) | const |
Get the filesystem mount_options of the chroot block device.
References mount_options.
Referenced by get_details(), get_keyfile(), and setup_env().
| sbuild::chroot::session_flags chroot_mountable::get_session_flags | ( | ) | const [virtual] |
Get the session flags of the chroot.
These determine how the Session controlling the chroot will operate.
Implements sbuild::chroot.
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
References sbuild::chroot::SESSION_NOFLAGS.
| void chroot_mountable::set_keyfile | ( | keyfile const & | keyfile, | |
| string_list & | used_keys | |||
| ) | [protected, virtual] |
Set the chroot properties from a keyfile.
The chroot name must have previously been set, so that the correct keyfile group may be determined.
| keyfile | the keyfile to get the properties from. | |
| used_keys | a list of the keys used will be set. |
Reimplemented from sbuild::chroot.
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
References sbuild::chroot::get_name(), sbuild::basic_keyfile< K, P >::get_object_value(), sbuild::keyfile_base::PRIORITY_OPTIONAL, set_location(), and set_mount_options().
| void chroot_mountable::set_location | ( | std::string const & | location | ) | [virtual] |
Set the location.
This is a path to the chroot directory inside the device (absolute path from the device root).
| location | the location. |
Reimplemented from sbuild::chroot.
References sbuild::is_absname(), and sbuild::chroot::LOCATION_ABS.
Referenced by set_keyfile().
| void chroot_mountable::set_mount_options | ( | std::string const & | mount_options | ) |
Set the filesystem mount_options of the chroot block device.
| mount_options | the mount options. |
Referenced by set_keyfile().
| void chroot_mountable::setup_env | ( | environment & | env | ) | [virtual] |
Set environment.
Set the environment that the setup scripts will see during execution.
| env | the environment to set. |
Reimplemented from sbuild::chroot.
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
References sbuild::environment::add(), and get_mount_options().
friend class chroot [friend] |
Reimplemented in sbuild::chroot_block_device, sbuild::chroot_loopback, and sbuild::chroot_lvm_snapshot.
std::string sbuild::chroot_mountable::mount_options [private] |
1.5.8