Top | ![]() |
![]() |
![]() |
![]() |
OstreeSysroot * | ostree_sysroot_new () |
OstreeSysroot * | ostree_sysroot_new_default () |
GFile * | ostree_sysroot_get_path () |
gboolean | ostree_sysroot_load () |
int | ostree_sysroot_get_fd () |
gboolean | ostree_sysroot_ensure_initialized () |
int | ostree_sysroot_get_bootversion () |
int | ostree_sysroot_get_subbootversion () |
GPtrArray * | ostree_sysroot_get_deployments () |
OstreeDeployment * | ostree_sysroot_get_booted_deployment () |
GFile * | ostree_sysroot_get_deployment_directory () |
GFile * | ostree_sysroot_get_deployment_origin_path () |
gboolean | ostree_sysroot_cleanup () |
gboolean | ostree_sysroot_get_repo () |
gboolean | ostree_sysroot_deployment_set_kargs () |
gboolean | ostree_sysroot_write_deployments () |
gboolean | ostree_sysroot_deploy_tree () |
OstreeDeployment * | ostree_sysroot_get_merge_deployment () |
GKeyFile * | ostree_sysroot_origin_new_from_refspec () |
gboolean | ostree_sysroot_simple_write_deployment () |
A OstreeSysroot object represents a physical root filesystem, which in particular should contain a toplevel /ostree directory. Inside this directory is an OstreeRepo in /ostree/repo, plus a set of deployments in /ostree/deploy.
gboolean ostree_sysroot_load (OstreeSysroot *self
,GCancellable *cancellable
,GError **error
);
Load deployment list, bootversion, and subbootversion from the
rootfs self
.
int
ostree_sysroot_get_fd (OstreeSysroot *self
);
Access a file descriptor that refers to the root directory of this
sysroot. ostree_sysroot_load()
must have been invoked prior to
calling this function.
gboolean ostree_sysroot_ensure_initialized (OstreeSysroot *self
,GCancellable *cancellable
,GError **error
);
Ensure that self
is set up as a valid rootfs, by creating
/ostree/repo, among other things.
OstreeDeployment *
ostree_sysroot_get_booted_deployment (OstreeSysroot *self
);
GFile * ostree_sysroot_get_deployment_directory (OstreeSysroot *self
,OstreeDeployment *deployment
);
GFile *
ostree_sysroot_get_deployment_origin_path
(GFile *deployment_path
);
gboolean ostree_sysroot_cleanup (OstreeSysroot *self
,GCancellable *cancellable
,GError **error
);
Delete any state that resulted from a partially completed transaction, such as incomplete deployments.
gboolean ostree_sysroot_get_repo (OstreeSysroot *self
,OstreeRepo **out_repo
,GCancellable *cancellable
,GError **error
);
Retrieve the OSTree repository in sysroot self
.
self |
Sysroot |
|
out_repo |
Repository in sysroot |
[out] |
cancellable |
Cancellable |
|
error |
Error |
gboolean ostree_sysroot_deployment_set_kargs (OstreeSysroot *self
,OstreeDeployment *deployment
,char **new_kargs
,GCancellable *cancellable
,GError **error
);
Entirely replace the kernel arguments of deployment
with the
values in new_kargs
.
self |
Sysroot |
|
deployment |
A deployment |
|
new_kargs |
Replace deployment's kernel arguments. |
[array zero-terminated=1][element-type utf8] |
cancellable |
Cancellable |
|
error |
Error |
gboolean ostree_sysroot_write_deployments (OstreeSysroot *self
,GPtrArray *new_deployments
,GCancellable *cancellable
,GError **error
);
Assuming new_deployments
have already been deployed in place on
disk, atomically update bootloader configuration.
self |
Sysroot |
|
new_deployments |
List of new deployments. |
[element-type OstreeDeployment] |
cancellable |
Cancellable |
|
error |
Error |
gboolean ostree_sysroot_deploy_tree (OstreeSysroot *self
,const char *osname
,const char *revision
,GKeyFile *origin
,OstreeDeployment *provided_merge_deployment
,char **override_kernel_argv
,OstreeDeployment **out_new_deployment
,GCancellable *cancellable
,GError **error
);
Check out deployment tree with revision revision
, performing a 3
way merge with provided_merge_deployment
for configuration.
self |
Sysroot |
|
osname |
osname to use for merge deployment. |
[allow-none] |
revision |
Checksum to add |
|
origin |
Origin to use for upgrades. |
[allow-none] |
provided_merge_deployment |
Use this deployment for merge path. |
[allow-none] |
override_kernel_argv |
Use these as kernel arguments; if |
[allow-none][array zero-terminated=1][element-type utf8] |
out_new_deployment |
The new deployment path. |
[out] |
cancellable |
Cancellable |
|
error |
Error |
OstreeDeployment * ostree_sysroot_get_merge_deployment (OstreeSysroot *self
,const char *osname
);
Find the deployment to use as a configuration merge source; this is the first one in the current deployment list which matches osname.
GKeyFile * ostree_sysroot_origin_new_from_refspec (OstreeSysroot *self
,const char *refspec
);
gboolean ostree_sysroot_simple_write_deployment (OstreeSysroot *sysroot
,const char *osname
,OstreeDeployment *new_deployment
,OstreeDeployment *merge_deployment
,OstreeSysrootSimpleWriteDeploymentFlags flags
,GCancellable *cancellable
,GError **error
);
Prepend new_deployment
to the list of deployments, commit, and
cleanup. By default, all other deployments for the given osname
except the merge deployment and the booted deployment will be
garbage collected.
If OSTREE_SYSROOT_SIMPLE_WRITE_DEPLOYMENT_FLAGS_RETAIN
is
specified, then all current deployments will be kept.
sysroot |
Sysroot |
|
osname |
OS name. |
[allow-none] |
new_deployment |
Prepend this deployment to the list |
|
merge_deployment |
Use this deployment for configuration merge. |
[allow-none] |
flags |
Flags controlling behavior |
|
cancellable |
Cancellable |
|
error |
Error |