Top |
OstreeDeployment * ostree_deployment_new (int index
,const char *osname
,const char *csum
,int deployserial
,const char *bootcsum
,int bootserial
);
index |
Global index into the bootloader entries |
|
osname |
"stateroot" for this deployment |
|
csum |
OSTree commit that will be deployed |
|
deployserial |
Unique counter |
|
bootcsum |
Kernel/initrd checksum. |
[nullable] |
bootserial |
Unique index |
int
ostree_deployment_get_deployserial (OstreeDeployment *self
);
const char *
ostree_deployment_get_bootcsum (OstreeDeployment *self
);
OstreeBootconfigParser *
ostree_deployment_get_bootconfig (OstreeDeployment *self
);
char *
ostree_deployment_get_origin_relpath (OstreeDeployment *self
);
Note this function only returns a *relative* path - if you want to
access, it, you must either use fd-relative api such as openat()
,
or concatenate it with the full ostree_sysroot_get_path()
.
OstreeDeploymentUnlockedState
ostree_deployment_get_unlocked (OstreeDeployment *self
);
Since: 2016.4
gboolean
ostree_deployment_is_pinned (OstreeDeployment *self
);
See ostree_sysroot_deployment_set_pinned()
.
Since: 2018.3
gboolean
ostree_deployment_is_staged (OstreeDeployment *self
);
Since: 2018.3
gboolean
ostree_deployment_is_finalization_locked
(OstreeDeployment *self
);
TRUE
if deployment is queued to be "finalized" at shutdown time, but requires
additional action.
Since: 2023.8
void ostree_deployment_set_index (OstreeDeployment *self
,int index
);
Sets the global index into the bootloader ordering.
void ostree_deployment_set_bootserial (OstreeDeployment *self
,int index
);
Should never have been made public API; don't use this.
void ostree_deployment_set_bootconfig (OstreeDeployment *self
,OstreeBootconfigParser *bootconfig
);
Set or clear the bootloader configuration.
void ostree_deployment_set_origin (OstreeDeployment *self
,GKeyFile *origin
);
Replace the "origin", which is a description of the source of the deployment and how to update to the next version.
void
ostree_deployment_origin_remove_transient_state
(GKeyFile *origin
);
The intention of an origin file is primarily describe the "inputs" that resulted in a deployment, and it's commonly used to derive the new state. For example, a key value (in pure libostree mode) is the "refspec". However, libostree (or other applications) may want to store "transient" state that should not be carried across upgrades.
This function just removes all members of the libostree-transient
group.
The name of that group is available to all libostree users; best practice
would be to prefix values underneath there with a short identifier for your
software.
Additionally, this function will remove the origin/unlocked
and
origin/override-commit
members; these should be considered transient state
that should have been under an explicit group.
Since: 2018.3
typedef struct { GObject parent_instance; int index; char *osname; char *csum; int deployserial; char *bootcsum; int bootserial; OstreeBootconfigParser *bootconfig; GKeyFile *origin; OstreeDeploymentUnlockedState unlocked; gboolean staged; gboolean finalization_locked; char **overlay_initrds; char *overlay_initrds_id; } OstreeDeployment;
Global offset |
||
OSTree checksum of tree |
||
How many times this particular csum appears in deployment list |
||
Checksum of kernel+initramfs |
||
An integer assigned to this tree per its ${bootcsum} |
||
OstreeBootconfigParser * |
Bootloader configuration |
|
How to construct an upgraded version of this tree |
||
The unlocked state |
||
TRUE iff this deployment is staged |
||
Checksums of staged additional initrds for this deployment |
||
Unique ID generated from initrd checksums; used to compare deployments |