sbuild
1.7.1
|
A chroot located in the filesystem. More...
#include <directory.h>
Public Types | |
typedef std::shared_ptr < directory > | ptr |
A shared_ptr to a chroot facet object. | |
typedef std::shared_ptr< const directory > | const_ptr |
A shared_ptr to a const chroot facet object. | |
![]() | |
typedef chroot::error | error |
Exception type. | |
![]() | |
enum | session_flags { SESSION_NOFLAGS = 0, SESSION_CREATE = 1 << 0, SESSION_CLONE = 1 << 1, SESSION_PURGE = 1 << 2 } |
Chroot session properties. More... | |
typedef std::shared_ptr< facet > | ptr |
A shared_ptr to a chroot facet object. | |
typedef std::shared_ptr< const facet > | const_ptr |
A shared_ptr to a const chroot facet object. | |
![]() | |
typedef std::shared_ptr< storage > | ptr |
A shared_ptr to a chroot storage object. | |
typedef std::shared_ptr< const storage > | const_ptr |
A shared_ptr to a const chroot storage object. | |
Public Member Functions | |
virtual | ~directory () |
The destructor. | |
virtual std::string const & | get_name () const |
Get the name of the chroot facet. More... | |
virtual facet::ptr | clone () const |
Copy the chroot facet. More... | |
virtual std::string | get_path () const |
Get the path to the chroot. More... | |
![]() | |
virtual | ~directory_base () |
The destructor. | |
std::string const & | get_directory () const |
Get the directory containing the chroot. More... | |
void | set_directory (const std::string &directory) |
Set the directory containing the chroot. More... | |
virtual void | setup_env (environment &env) const |
Set environment. More... | |
![]() | |
virtual | ~facet () |
The destructor. | |
virtual session_flags | get_session_flags () const |
Get the session flags of the chroot. More... | |
![]() | |
virtual | ~storage () |
The destructor. | |
Static Public Member Functions | |
static ptr | create () |
Create a chroot facet. More... | |
static ptr | create (const btrfs_snapshot &rhs) |
Create a chroot facet from a btrfs snapshot. More... | |
Protected Member Functions | |
directory () | |
The constructor. | |
directory (const directory &rhs) | |
The copy constructor. | |
directory (const btrfs_snapshot &rhs) | |
The copy constructor. | |
void | set_chroot (chroot &chroot, bool copy) |
Set containing chroot. More... | |
virtual void | setup_lock (chroot::setup_type type, bool lock, int status) |
![]() | |
directory_base () | |
The constructor. | |
directory_base (const directory_base &rhs) | |
The copy constructor. | |
virtual void | get_details (format_detail &detail) const |
Get detailed information about the chroot for output. More... | |
virtual void | get_used_keys (string_list &used_keys) const |
Get a list of the keys used during keyfile parsing. More... | |
virtual void | get_keyfile (keyfile &keyfile) const |
Copy the chroot properties into a keyfile. More... | |
virtual void | set_keyfile (const keyfile &keyfile) |
Set the chroot properties from a keyfile. More... | |
![]() | |
facet () | |
The constructor. | |
![]() | |
storage () | |
The constructor. | |
Friends | |
class | chroot |
class | btrfs_snapshot |
Additional Inherited Members | |
![]() | |
std::string | directory |
The directory to use. | |
A chroot located in the filesystem.
It runs setup scripts and can provide multiple sessions using the union facet.
|
virtual |
Copy the chroot facet.
This is a virtual copy constructor.
Implements sbuild::chroot::facet::facet.
References directory().
|
static |
Create a chroot facet.
References directory().
Referenced by sbuild::chroot::facet::btrfs_snapshot::chroot_source_setup().
|
static |
Create a chroot facet from a btrfs snapshot.
References directory().
|
virtual |
Get the name of the chroot facet.
Implements sbuild::chroot::facet::facet.
|
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::facet::storage.
References sbuild::chroot::chroot::get_mount_location(), and sbuild::chroot::facet::facet::owner.
|
protectedvirtual |
Set containing chroot.
The copy parameter is used to inform the facet if it is new or a copy; this is intended to allow additional facets to only be added if the facet is new, for example, to avoid re-adding removed facets when copying a chroot.
chroot | the chroot containing this facet. |
copy | true if the facet has been copied, or false if this is a new instance. |
Reimplemented from sbuild::chroot::facet::facet.
References sbuild::chroot::chroot::add_facet(), sbuild::chroot::facet::session_clonable::create(), sbuild::chroot::facet::fsunion::create(), sbuild::chroot::chroot::get_facet(), sbuild::chroot::facet::facet::owner, and sbuild::chroot::facet::facet::set_chroot().