OSTree.SysrootUpgrader

g GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object OSTree.SysrootUpgrader OSTree.SysrootUpgrader GObject.Object->OSTree.SysrootUpgrader Gio.Initable->OSTree.SysrootUpgrader

Subclasses:None

Methods

Inherited:GObject.Object (37), Gio.Initable (2)
Structs:GObject.ObjectClass (5)
class check_timestamps (repo, from_rev, to_rev)
class new (sysroot, cancellable)
class new_for_os (sysroot, osname, cancellable)
class new_for_os_with_flags (sysroot, osname, flags, cancellable)
  deploy (cancellable)
  dup_origin ()
  get_origin ()
  get_origin_description ()
  pull (flags, upgrader_flags, progress, cancellable)
  pull_one_dir (dir_to_pull, flags, upgrader_flags, progress, cancellable)
  set_origin (origin, cancellable)

Virtual Methods

Inherited:GObject.Object (7), Gio.Initable (1)

Properties

Name Type Flags Short Description
flags OSTree.SysrootUpgraderFlags r/w/co  
osname str r/w/co  
sysroot OSTree.Sysroot r/w/co  

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)

Class Details

class OSTree.SysrootUpgrader(**kwargs)
Bases:GObject.Object, Gio.Initable
Abstract:No
classmethod check_timestamps(repo, from_rev, to_rev)
Parameters:
  • repo (OSTree.Repo) – Repo
  • from_rev (str) – From revision
  • to_rev (str) – To revision
Raises:

GLib.Error

Return type:

bool

Check that the timestamp on to_rev is equal to or newer than from_rev. This protects systems against man-in-the-middle attackers which provide a client with an older commit.

classmethod new(sysroot, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

An upgrader

Return type:

OSTree.SysrootUpgrader

classmethod new_for_os(sysroot, osname, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

An upgrader

Return type:

OSTree.SysrootUpgrader

classmethod new_for_os_with_flags(sysroot, osname, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

An upgrader

Return type:

OSTree.SysrootUpgrader

deploy(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – Cancellable
Raises:GLib.Error
Return type:bool

Write the new deployment to disk, perform a configuration merge with /etc, and update the bootloader configuration.

dup_origin()
Returns:A copy of the origin file, or None if unknown
Return type:GLib.KeyFile
get_origin()
Returns:The origin file, or None if unknown
Return type:GLib.KeyFile
get_origin_description()
Returns:A one-line descriptive summary of the origin, or None if unknown
Return type:str
pull(flags, upgrader_flags, progress, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

out_changed:Whether or not the origin changed

Return type:

(bool, out_changed: bool)

Perform a pull from the origin. First check if the ref has changed, if so download the linked objects, and store the updated ref locally. Then out_changed will be True.

If the origin remote is unchanged, out_changed will be set to False.

pull_one_dir(dir_to_pull, flags, upgrader_flags, progress, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

out_changed:Whether or not the origin changed

Return type:

(bool, out_changed: bool)

Like OSTree.SysrootUpgrader.pull(), but allows retrieving just a subpath of the tree. This can be used to download metadata files from inside the tree such as package databases.

set_origin(origin, cancellable)
Parameters:
Raises:

GLib.Error

Return type:

bool

Replace the origin with origin.

Property Details

OSTree.SysrootUpgrader.props.flags
Name:flags
Type:OSTree.SysrootUpgraderFlags
Default Value:0
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY
OSTree.SysrootUpgrader.props.osname
Name:osname
Type:str
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY
OSTree.SysrootUpgrader.props.sysroot
Name:sysroot
Type:OSTree.Sysroot
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY