Root partition mount point

Root partition mount point — Manage physical root filesystem

Functions

Types and Values

typedef OstreeSysroot

Object Hierarchy


Description

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.

Functions

ostree_sysroot_get_type ()

GType
ostree_sysroot_get_type (void);

ostree_sysroot_new ()

OstreeSysroot *
ostree_sysroot_new (GFile *path);

Parameters

path

Path to a system root directory

 

Returns

An accessor object for an system root located at path .

[transfer full]


ostree_sysroot_new_default ()

OstreeSysroot *
ostree_sysroot_new_default (void);

Returns

An accessor for the current visible root / filesystem.

[transfer full]


ostree_sysroot_get_path ()

GFile *
ostree_sysroot_get_path (OstreeSysroot *self);

Returns

Path to rootfs.

[transfer none]


ostree_sysroot_load ()

gboolean
ostree_sysroot_load (OstreeSysroot *self,
                     GCancellable *cancellable,
                     GError **error);

Load deployment list, bootversion, and subbootversion from the rootfs self .

Parameters

self

Sysroot

 

cancellable

Cancellable

 

error

Error

 

ostree_sysroot_ensure_initialized ()

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.

Parameters

self

Sysroot

 

cancellable

Cancellable

 

error

Error

 

ostree_sysroot_get_bootversion ()

int
ostree_sysroot_get_bootversion (OstreeSysroot *self);

ostree_sysroot_get_subbootversion ()

int
ostree_sysroot_get_subbootversion (OstreeSysroot *self);

ostree_sysroot_get_deployments ()

GPtrArray *
ostree_sysroot_get_deployments (OstreeSysroot *self);

Parameters

self

Sysroot

 

Returns

Ordered list of deployments.

[element-type OstreeDeployment][transfer container]


ostree_sysroot_get_booted_deployment ()

OstreeDeployment *
ostree_sysroot_get_booted_deployment (OstreeSysroot *self);

Parameters

self

Sysroot

 

Returns

The currently booted deployment, or NULL if none.

[transfer none]


ostree_sysroot_get_deployment_directory ()

GFile *
ostree_sysroot_get_deployment_directory
                               (OstreeSysroot *self,
                                OstreeDeployment *deployment);

Parameters

self

Sysroot

 

deployment

A deployment

 

Returns

Path to deployment root directory.

[transfer full]


ostree_sysroot_get_deployment_origin_path ()

GFile *
ostree_sysroot_get_deployment_origin_path
                               (GFile *deployment_path);

Parameters

deployment_path

A deployment path

 

Returns

Path to deployment origin file.

[transfer full]


ostree_sysroot_cleanup ()

gboolean
ostree_sysroot_cleanup (OstreeSysroot *self,
                        GCancellable *cancellable,
                        GError **error);

Delete any state that resulted from a partially completed transaction, such as incomplete deployments.

Parameters

self

Sysroot

 

cancellable

Cancellable

 

error

Error

 

ostree_sysroot_get_repo ()

gboolean
ostree_sysroot_get_repo (OstreeSysroot *self,
                         OstreeRepo **out_repo,
                         GCancellable *cancellable,
                         GError **error);

Retrieve the OSTree repository in sysroot self .

Parameters

self

Sysroot

 

out_repo

Repository in sysroot self .

[out]

cancellable

Cancellable

 

error

Error

 

ostree_sysroot_write_deployments ()

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.

Parameters

self

Sysroot

 

new_deployments

List of new deployments.

[element-type OstreeDeployment]

cancellable

Cancellable

 

error

Error

 

ostree_sysroot_get_merge_deployment ()

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.

Parameters

self

Sysroot

 

osname

Operating system group.

[allow-none]

Returns

Configuration merge deployment.

[transfer full]

Types and Values

OstreeSysroot

typedef struct OstreeSysroot OstreeSysroot;