![]() |
![]() |
![]() |
Schroot Reference Manual | ![]() |
---|
SbuildConfigSbuildConfig — config object |
SbuildConfig; SbuildConfigClass; enum SbuildConfigFileError; #define SBUILD_CONFIG_FILE_ERROR SbuildConfig* sbuild_config_new (void); SbuildConfig* sbuild_config_new_from_file (const char *file); SbuildConfig* sbuild_config_new_from_directory (const char *dir); void sbuild_config_add_config_file (SbuildConfig *config, const char *file); void sbuild_config_add_config_directory (SbuildConfig *config, const char *dir); const GList* sbuild_config_get_chroots (SbuildConfig *config); SbuildChroot* sbuild_config_find_chroot (SbuildConfig *config, const char *name); SbuildChroot* sbuild_config_find_alias (SbuildConfig *config, const char *name); GList* sbuild_config_get_chroot_list (SbuildConfig *config); void sbuild_config_print_chroot_list (SbuildConfig *config, FILE *file); void sbuild_config_print_chroot_info (SbuildConfig *config, char **chroots, FILE *file); char** sbuild_config_validate_chroots (SbuildConfig *config, char **chroots);
"config-directory" gchararray : Write / Construct "config-file" gchararray : Write / Construct
This class holds the configuration details from the configuration file. Conceptually, it's an opaque container of SbuildChroot objects.
Methods are provided to query the available chroots and find specific chroots.
typedef struct { GObjectClass parent; } SbuildConfigClass;
SbuildConfig class.
GObjectClass parent ; |
the parent class |
typedef enum { SBUILD_CONFIG_FILE_ERROR_STAT_FAIL, SBUILD_CONFIG_FILE_ERROR_OWNERSHIP, SBUILD_CONFIG_FILE_ERROR_PERMISSIONS, SBUILD_CONFIG_FILE_ERROR_NOT_REGULAR } SbuildConfigFileError;
The errors which can occur while loading a configuration file.
SBUILD_CONFIG_FILE_ERROR_STAT_FAIL |
The file could not be fstat() ed
|
SBUILD_CONFIG_FILE_ERROR_OWNERSHIP |
Ownership checks failed |
SBUILD_CONFIG_FILE_ERROR_PERMISSIONS |
Permissions checks failed |
SBUILD_CONFIG_FILE_ERROR_NOT_REGULAR |
Not a regular file |
#define SBUILD_CONFIG_FILE_ERROR sbuild_config_file_error_quark()
The error domain for sbuild configuration file errors.
SbuildConfig* sbuild_config_new (void);
Creates a new SbuildConfig.
Returns : | the newly created SbuildConfig. |
SbuildConfig* sbuild_config_new_from_file (const char *file);
Creates a new SbuildConfig.
file : |
the filename to open. |
Returns : | the newly created SbuildConfig. |
SbuildConfig* sbuild_config_new_from_directory (const char *dir);
Creates a new SbuildConfig from a directory of files.
dir : |
the directory to open. |
Returns : | the newly created SbuildConfig. |
void sbuild_config_add_config_file (SbuildConfig *config, const char *file);
Add the configuration filename. The configuration file specified will be loaded.
config : |
an SbuildConfig. |
file : |
the filename to add. |
void sbuild_config_add_config_directory (SbuildConfig *config, const char *dir);
Add the configuration directory. The configuration files in the directory will be loaded.
config : |
an SbuildConfig. |
dir : |
the directory to add. |
const GList* sbuild_config_get_chroots (SbuildConfig *config);
Get a list of available chroots.
config : |
a SbuildConfig |
Returns : | a list of available chroots, or NULL if no chroots are available. |
SbuildChroot* sbuild_config_find_chroot (SbuildConfig *config, const char *name);
Find a chroot by its name.
config : |
an SbuildConfig |
name : |
the chroot name |
Returns : | the chroot if found, otherwise NULL. |
SbuildChroot* sbuild_config_find_alias (SbuildConfig *config, const char *name);
Find a chroot by its name or an alias.
config : |
an SbuildConfig |
name : |
the chroot name |
Returns : | the chroot if found, otherwise NULL. |
GList* sbuild_config_get_chroot_list (SbuildConfig *config);
Get the names (including aliases) of all the available chroots.
config : |
an SbuildConfig |
Returns : | the list, or NULL if no chroots are available. |
void sbuild_config_print_chroot_list (SbuildConfig *config, FILE *file);
Print all the available chroots to the specified file.
config : |
an SbuildConfig |
file : |
the file to print to |
void sbuild_config_print_chroot_info (SbuildConfig *config, char **chroots, FILE *file);
Print information about the specified chroots to the specified file.
config : |
an SbuildConfig |
chroots : |
the chroots to print |
file : |
the file to print to |
char** sbuild_config_validate_chroots (SbuildConfig *config, char **chroots);
Check that all the chroots specified by chroots
exist in config
.
config : |
an SbuildConfig |
chroots : |
the chroots to validate |
Returns : | NULL if all chroots are valid, or else a vector of invalid chroots. |
<< SbuildChrootLvmSnapshot | SbuildAuth >> |