OSTree.Deployment¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class OSTree.Deployment(**kwargs)¶
- Bases:
- Abstract:
No
- classmethod new(index, osname, csum, deployserial, bootcsum, bootserial)¶
- Parameters:
- Returns:
New deployment
- Return type:
- classmethod origin_remove_transient_state(origin)¶
- Parameters:
origin (
GLib.KeyFile
) – An 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
andorigin/override-commit
members; these should be considered transient state that should have been under an explicit group.New in version 2018.3.
- classmethod unlocked_state_to_string(state)¶
- Parameters:
state (
OSTree.DeploymentUnlockedState
) –- Returns:
Description of state
- Return type:
New in version 2016.4.
- clone()¶
- Returns:
New deep copy of self
- Return type:
- equal(bp)¶
- Parameters:
bp (
OSTree.Deployment
) – A deployment- Returns:
True
if deployments have the same osname, csum, and deployserial- Return type:
- get_bootconfig()¶
- Returns:
Boot configuration
- Return type:
- get_origin()¶
- Returns:
Origin
- Return type:
GLib.KeyFile
orNone
- get_origin_relpath()¶
- Returns:
Path to deployment root directory, relative to sysroot
- Return type:
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
().
- get_unlocked()¶
- Return type:
New in version 2016.4.
- is_finalization_locked()¶
- Returns:
TRUE
if deployment is queued to be “finalized” at shutdown time, but requires additional action.- Return type:
New in version 2023.8.
- is_pinned()¶
- Returns:
TRUE
if deployment will not be subject to GC- Return type:
See
OSTree.Sysroot.deployment_set_pinned
().New in version 2018.3.
- is_staged()¶
- Returns:
TRUE
if deployment should be “finalized” at shutdown time- Return type:
New in version 2018.3.
- set_bootconfig(bootconfig)¶
- Parameters:
bootconfig (
OSTree.BootconfigParser
orNone
) – Bootloader configuration object
Set or clear the bootloader configuration.
- set_bootserial(index)¶
- Parameters:
index (
int
) – Don’t use this
Should never have been made public API; don’t use this.
- set_index(index)¶
- Parameters:
index (
int
) – Index into bootloader ordering
Sets the global index into the bootloader ordering.
- set_origin(origin)¶
- Parameters:
origin (
GLib.KeyFile
orNone
) – Set the origin for this deployment
Replace the “origin”, which is a description of the source of the deployment and how to update to the next version.