Common chroot data. More...
#include <sbuild-chroot-facet.h>
Public Types | |
typedef std::shared_ptr < chroot_facet > | ptr |
A shared_ptr to a chroot facet object. | |
typedef std::shared_ptr< const chroot_facet > | const_ptr |
A shared_ptr to a const chroot facet object. | |
Public Member Functions | |
virtual | ~chroot_facet () |
The destructor. | |
virtual ptr | clone () const =0 |
Copy the chroot facet. | |
virtual std::string const & | get_name () const =0 |
Get the name of the chroot facet. | |
virtual void | setup_env (chroot const &chroot, environment &env) const =0 |
Set environment. | |
virtual chroot::session_flags | get_session_flags (chroot const &chroot) const =0 |
Get the session flags of the chroot. | |
virtual void | get_details (chroot const &chroot, format_detail &detail) const =0 |
Get detailed information about the chroot for output. | |
virtual void | get_keyfile (chroot const &chroot, keyfile &keyfile) const =0 |
Copy the chroot properties into a keyfile. | |
virtual void | set_keyfile (chroot &chroot, keyfile const &keyfile, string_list &used_keys)=0 |
Set the chroot properties from a keyfile. | |
Protected Member Functions | |
chroot_facet () | |
The constructor. | |
void | set_chroot (chroot &chroot) |
Set containing chroot. | |
Protected Attributes | |
chroot * | owner |
Chroot owning this facet. | |
Friends | |
class | chroot |
Common chroot data.
This class contains all of the metadata associated with a single chroot, for all chroot types. This is the in-core representation of a chroot definition in the configuration file, and may be initialised directly from an open keyfile.
virtual ptr sbuild::chroot_facet::clone | ( | ) | const [pure virtual] |
Copy the chroot facet.
This is a virtual copy constructor.
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
virtual void sbuild::chroot_facet::get_details | ( | chroot const & | chroot, | |
format_detail & | detail | |||
) | const [pure virtual] |
Get detailed information about the chroot for output.
chroot | the chroot to use. | |
detail | the details to output to. |
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
virtual void sbuild::chroot_facet::get_keyfile | ( | chroot const & | chroot, | |
keyfile & | keyfile | |||
) | const [pure 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.
chroot | the chroot to use. | |
keyfile | the keyfile to use. |
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
virtual std::string const& sbuild::chroot_facet::get_name | ( | ) | const [pure virtual] |
Get the name of the chroot facet.
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
virtual chroot::session_flags sbuild::chroot_facet::get_session_flags | ( | chroot const & | chroot | ) | const [pure virtual] |
Get the session flags of the chroot.
These determine how the Session controlling the chroot will operate.
chroot | the chroot to use. |
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
void sbuild::chroot_facet::set_chroot | ( | chroot & | chroot | ) | [inline, protected] |
virtual void sbuild::chroot_facet::set_keyfile | ( | chroot & | chroot, | |
keyfile const & | keyfile, | |||
string_list & | used_keys | |||
) | [pure 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.
chroot | the chroot to use. | |
keyfile | the keyfile to get the properties from. | |
used_keys | a list of the keys used will be set. |
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.
virtual void sbuild::chroot_facet::setup_env | ( | chroot const & | chroot, | |
environment & | env | |||
) | const [pure virtual] |
Set environment.
Set the environment that the setup scripts will see during execution.
chroot | the chroot to use. | |
env | the environment to set. |
Implemented in sbuild::chroot_facet_mountable, sbuild::chroot_facet_personality, sbuild::chroot_facet_session_clonable, sbuild::chroot_facet_session, sbuild::chroot_facet_source_clonable, sbuild::chroot_facet_source, sbuild::chroot_facet_union, and sbuild::chroot_facet_userdata.