Flatpak.Installation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Flatpak.Installation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new_for_path(path, user, cancellable)¶
- Parameters:
user (
bool) – whether this is a user-specific locationcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a new
Flatpak.Installation- Return type:
Creates a new
Flatpak.Installationfor the installation at the given path.
- classmethod new_system(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a new
Flatpak.Installation- Return type:
Creates a new
Flatpak.Installationfor the default system-wide installation.
- classmethod new_system_with_id(id, cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a new
Flatpak.Installation- Return type:
Creates a new
Flatpak.Installationfor the system-wide installation id.New in version 0.8.
- classmethod new_user(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a new
Flatpak.Installation- Return type:
Creates a new
Flatpak.Installationfor the per-user installation.
- add_remote(remote, if_needed, cancellable)¶
- Parameters:
remote (
Flatpak.Remote) – the newFlatpak.Remotecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueif the modifications have been committed successfully- Return type:
Adds a new remote object to the set of remotes. This is similar to
Flatpak.Installation.modify_remote() for non-existing remote names. However, if the named remote already exists then instead of modifying it it fails withFlatpak.Error.ALREADY_INSTALLED, or if if_needed is true it silently succeeds without doing anything.As an exception to the last, if the local config has a filter defined, but the new remote unsets the filter (for example, it comes from an unfiltered .flatpakref via
Flatpak.Remote.new_from_file()) the the local remote filter gets reset. This is to allow the setup where there is a default setup of a filtered remote, yet you can still use the standard flatpakref file to get the full contents without getting two remotes.New in version 1.3.4.
- cleanup_local_refs_sync(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
Trueon success- Return type:
Remove all OSTree refs from the local flatpak repository which are not in a deployed state. The next time the underlying OSTree repo is pruned, objects which were attached to that ref will be removed. This is useful if you pulled a flatpak refs using
Flatpak.Installation.install_full() and specifiedFlatpak.InstallFlags.NO_DEPLOYbut then decided not to deploy the refs later on and want to remove the local refs to prevent them from taking up disk space. Note that this will not remove the objects referred to by ref from the underlying OSTree repo, you should useFlatpak.Installation.prune_local_repo() to do that.New in version 0.10.0.
- create_monitor(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a new
Gio.FileMonitorinstance, orNoneon error- Return type:
Gets monitor object for the installation. The returned file monitor will emit the
Gio.FileMonitor::changedsignal whenever an application or runtime was installed, uninstalled or updated.
- drop_caches(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
- Return type:
Drops all internal (in-memory) caches. For instance, this may be needed to pick up new or changed remotes configured outside this installation instance.
- fetch_remote_metadata_sync(remote_name, ref, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remoteref (
Flatpak.Ref) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.Bytescontaining the flatpak metadata file, orNoneif an error occurred- Return type:
Obtains the metadata file from a commit.
NOTE: Since 0.11.4 this information is accessible in
Flatpak.RemoteRef, so this function is not very useful anymore.
- fetch_remote_ref_sync(remote_name, kind, name, arch, branch, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remotekind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app/runtime to fetcharch (
strorNone) – which architecture to fetch (default: current architecture)branch (
strorNone) – which branch to fetch (default: ‘master’)cancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
Flatpak.RemoteRefinstance, orNone- Return type:
Gets the current remote branch of a ref in the remote.
- fetch_remote_ref_sync_full(remote_name, kind, name, arch, branch, flags, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remotekind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app/runtime to fetcharch (
strorNone) – which architecture to fetch (default: current architecture)branch (
strorNone) – which branch to fetch (default: ‘master’)flags (
Flatpak.QueryFlags) – set ofFlatpak.QueryFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
Flatpak.RemoteRefinstance, orNone- Return type:
Gets the current remote branch of a ref in the remote.
New in version 1.3.3.
- fetch_remote_size_sync(remote_name, ref, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remoteref (
Flatpak.Ref) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
True, unless an error occurred- download_size:
return location for the (maximum) download size
- installed_size:
return location for the installed size
- Return type:
Gets information about the maximum amount of data that needs to be transferred to pull the ref from a remote repository, and about the amount of local disk space that is required to check out this commit.
Note that if there are locally available data that are in the ref, which is common for instance if you’re doing an update then the real download size may be smaller than what is returned here.
NOTE: Since 0.11.4 this information is accessible in
Flatpak.RemoteRef, so this function is not very useful anymore.
- get_config(key, cancellable)¶
- Parameters:
key (
str) – the name of the key to getcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The (newly allocated) value, or
Noneon error (GLib.KeyFileError.KEY_NOT_FOUNDerror if key is not set)- Return type:
Get a global configuration option for the installation, see
Flatpak.Installation.set_config_sync() for supported keys.
- get_current_installed_app(name, cancellable)¶
- Parameters:
name (
str) – the name of the appcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
- Return type:
Get the last build of reference name that was installed with
Flatpak.Installation.install(), orNoneif the reference has never been installed locally.
- get_default_languages()¶
-
Get the default languages used by the installation to decide which subpaths to install of locale extensions. This list may also be used by frontends like GNOME Software to decide which language-specific apps to display. An empty array means that all languages should be installed.
New in version 1.5.0.
- get_default_locales()¶
-
Like
Flatpak.Installation.get_default_languages() but includes territory information (e.g.en_USrather thanen) which may be included in theextra-languagesconfiguration.Strings returned by this function are in the format specified by setlocale() :
language[_territory][.codeset][@modifier].New in version 1.5.1.
- get_display_name()¶
- Returns:
a string with the installation’s display name
- Return type:
Returns the display name of the installation for self.
Note that this function may return
Noneif the installation does not have a display name.New in version 0.8.
- get_id()¶
- Returns:
a string with the installation’s ID
- Return type:
Returns the ID of the installation for self.
The ID for the default system installation is “default”. The ID for the user installation is “user”.
New in version 0.8.
- get_installed_ref(kind, name, arch, branch, cancellable)¶
- Parameters:
kind (
Flatpak.RefKind) – whether this is an app or runtimename (
str) – name of the app/runtime to fetcharch (
strorNone) – which architecture to fetch (default: current architecture)branch (
strorNone) – which branch to fetch (default: “master”)cancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
an
Flatpak.InstalledRef, orNoneif an error occurred- Return type:
Returns information about an installed ref, such as the available builds, its size, location, etc.
- get_is_user()¶
-
Returns whether the installation is for a user-specific location.
- get_min_free_space_bytes()¶
- Raises:
- Returns:
Trueon success, orFalseon error.- out_bytes:
Location to store the result
- Return type:
Returns the min-free-space config value from the OSTree repository of this installation.
Applications can use this value, together with information about the available disk space and the size of pending updates or installs, to estimate whether a pull operation will fail due to running out of disk space.
New in version 1.1.
- get_no_interaction()¶
-
Returns the value set with
Flatpak.Installation.set_no_interaction().New in version 1.1.1.
- get_priority()¶
- Returns:
an integer with the configured priority value
- Return type:
Returns the numeric priority of the installation for self.
New in version 0.8.
- get_remote_by_name(name, cancellable)¶
- Parameters:
name (
str) – a remote namecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
Flatpak.Remoteinstance, orNonewith error set- Return type:
Looks up a remote by name.
- get_storage_type()¶
- Returns:
- Return type:
Returns the type of storage of the installation for self.
New in version 0.8.
- install(remote_name, kind, name, arch, branch, progress, progress_data, cancellable)¶
- Parameters:
remote_name (
str) – name of the remote to usekind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app/runtime to fetcharch (
strorNone) – which architecture to fetch (default: current architecture)branch (
strorNone) – which branch to fetch (default: ‘master’)progress (
Flatpak.ProgressCallbackorNone) – progress callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The ref for the newly installed app or
Noneon failure- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_install() instead. It has a lot more interesting features.Install a new application or runtime.
Note that this function was originally written to always return a
Flatpak.InstalledRef. Since 0.9.13, passingFlatpak.InstallFlags.NO_DEPLOYwill only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, soFlatpak.Error.ONLY_PULLEDwill be set and the caller must respond accordingly.Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_install() instead.
- install_bundle(file, progress, progress_data, cancellable)¶
- Parameters:
progress (
Flatpak.ProgressCallbackorNone) – progress callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The ref for the newly installed app or
Noneon failure- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_install_bundle() instead. It has a lot more interesting features.Install an application or runtime from an flatpak bundle file. See flatpak-build-bundle(1) for how to create bundles.
Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_install_bundle() instead.
- install_full(flags, remote_name, kind, name, arch, branch, subpaths, progress, progress_data, cancellable)¶
- Parameters:
flags (
Flatpak.InstallFlags) – set ofFlatpak.InstallFlagsflagremote_name (
str) – name of the remote to usekind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app/runtime to fetcharch (
strorNone) – which architecture to fetch (default: current architecture)branch (
strorNone) – which branch to fetch (default: ‘master’)subpaths ([
str] orNone) – A list of subpaths to fetch, orNonefor everythingprogress (
Flatpak.ProgressCallbackorNone) – progress callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The ref for the newly installed app or
Noneon failure- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_install() instead. It has a lot more interesting features.Install a new application or runtime.
Note that this function was originally written to always return a
Flatpak.InstalledRef. Since 0.9.13, passingFlatpak.InstallFlags.NO_DEPLOYwill only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, soFlatpak.Error.ONLY_PULLEDwill be set and the caller must respond accordingly.Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_install() instead.
- install_ref_file(ref_file_data, cancellable)¶
- Parameters:
ref_file_data (
GLib.Bytes) – The ref file contentscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
Flatpak.RemoteRefif the remote has been added successfully,Noneon error.- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_install_flatpakref() instead. It has a lot more interesting features.Creates a remote based on the passed in .flatpakref file contents in ref_file_data and returns the
Flatpak.RemoteRefthat can be used to install it.Note, the
Flatpak.RemoteRefwill not have the commit field set, or other details, to avoid unnecessary roundtrips. If you need that you have to resolve it explicitly withFlatpak.Installation.fetch_remote_ref_sync().New in version 0.6.10.
Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_install_flatpakref() instead.
- launch(name, arch, branch, commit, cancellable)¶
- Parameters:
name (
str) – name of the app to launcharch (
strorNone) – which architecture to launch (default: current architecture)branch (
strorNone) – which branch of the application (default: “master”)cancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
True, unless an error occurred- Return type:
Launch an installed application.
You can use
Flatpak.Installation.get_installed_ref() orFlatpak.Installation.get_current_installed_app() to find out what builds are available, in order to get a value for commit.
- launch_full(flags, name, arch, branch, commit, instance_out, cancellable)¶
- Parameters:
flags (
Flatpak.LaunchFlags) – set ofFlatpak.LaunchFlagsname (
str) – name of the app to launcharch (
strorNone) – which architecture to launch (default: current architecture)branch (
strorNone) – which branch of the application (default: “master”)instance_out (
Flatpak.InstanceorNone) – return location for aFlatpak.Instancecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
True, unless an error occurred- Return type:
Launch an installed application.
You can use
Flatpak.Installation.get_installed_ref() orFlatpak.Installation.get_current_installed_app() to find out what builds are available, in order to get a value for commit.Compared to
Flatpak.Installation.launch(), this function returns aFlatpak.Instancethat can be used to get information about the running instance. You can also use it to wait for the instance to be done withGLib.child_watch_add() if you pass theFlatpak.LaunchFlags.DO_NOT_REAPflag.New in version 1.1.
- list_installed_refs(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances- Return type:
Lists the installed references.
- list_installed_refs_by_kind(kind, cancellable)¶
- Parameters:
kind (
Flatpak.RefKind) – the kind of installationcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances- Return type:
Lists the installed references of a specific kind.
- list_installed_refs_for_update(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances, orNoneon error- Return type:
Lists the installed apps and runtimes that have an update available, either from the configured remote or locally available but not deployed (see
Flatpak.Transaction.set_no_deploy()).This also checks if any of
Flatpak.InstalledRefhas a missingFlatpak.RelatedRef(which hasshould-downloadset toTrue) or runtime. If so, it adds the ref to the returningGLib.PtrArrayto pull in theFlatpak.RelatedRefor runtime again via an update operation inFlatpak.Transaction.In case more than one app needs an update of the same runtime or extension, this function will return all of those apps.
- Parameters:
remote_name (
str) – the name of the remote providing refref (
str) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.RelatedRefinstances- Return type:
Lists all the locally installed refs that are related to ref. These are things that are interesting to install, update, or uninstall together with ref. For instance, locale data or debug information.
Note that while the related refs are usually installed from the same remote as ref (remote_name), it is possible they were installed from another remote.
This function is similar to
Flatpak.Installation.list_remote_related_refs_sync, but instead of looking at what is available on the remote, it only looks at the locally installed refs. This is useful for instance when you’re looking for related refs to uninstall, or when you’re planning to useFlatpak.UpdateFlags.NO_PULLto install previously pulled refs.New in version 0.6.7.
- list_pinned_refs(arch, cancellable)¶
- Parameters:
arch (
strorNone) – if non-None, the architecture of refs to collectcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances- Return type:
Lists the installed references that are pinned, meaning they will not be returned by
Flatpak.Installation.list_unused_refs() and won’t be removed unless explicitly specified for removal.Refs appear here either because they have been pinned automatically by Flatpak or because the user pinned them; see flatpak-pin(1).
New in version 1.9.1.
- list_remote_refs_sync(remote_or_uri, cancellable)¶
- Parameters:
remote_or_uri (
str) – the name or URI of the remotecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.RemoteRefinstances- Return type:
Lists all the applications and runtimes in a remote.
- list_remote_refs_sync_full(remote_or_uri, flags, cancellable)¶
- Parameters:
remote_or_uri (
str) – the name or URI of the remoteflags (
Flatpak.QueryFlags) – set ofFlatpak.QueryFlagscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.RemoteRefinstances- Return type:
Lists all the applications and runtimes in a remote.
New in version 1.3.3.
- Parameters:
remote_name (
str) – the name of the remoteref (
str) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.RelatedRefinstances- Return type:
Lists all the available refs on remote_name that are related to ref, and which are appropriate for the installed version of ref. For example if the installed version of org.videolan.VLC has a related ref of org.videolan.VLC.Plugin.bdj//3-19.08 and the remote version of VLC has a related ref of org.videolan.VLC.Plugin.bdj//3-20.08, this function will only return the 3-19.08 branch.
See also the related functions
Flatpak.Installation.list_remote_related_refs_sync() andFlatpak.Installation.list_installed_related_refs_sync().The returned list contains all available related refs, but not every one should always be installed. For example,
Flatpak.RelatedRef.should_download() returnsTrueif the reference should be installed/updated with the app, andFlatpak.RelatedRef.should_delete() returnsTrueif it should be uninstalled with the main ref.The commit property of each
Flatpak.RelatedRefis not guaranteed to be non-None.New in version 1.11.1.
- Parameters:
remote_name (
str) – the name of the remoteref (
str) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.RelatedRefinstances- Return type:
Lists all the available refs on remote_name that are related to ref, and the subpaths to use. These are things that are interesting to install, update, or uninstall together with ref. For instance, locale data or debug information.
The returned list contains all available related refs, but not every one should always be installed. For example,
Flatpak.RelatedRef.should_download() returnsTrueif the reference should be installed/updated with the app, andFlatpak.RelatedRef.should_delete() returnsTrueif it should be uninstalled with the main ref.The commit property of each
Flatpak.RelatedRefis not guaranteed to be non-None.New in version 0.6.7.
- list_remotes(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.Remoteinstances- Return type:
Lists the static remotes, in priority (highest first) order. For same priority, an earlier added remote comes before a later added one.
- list_remotes_by_type(types, cancellable)¶
- Parameters:
types ([
Flatpak.RemoteType]) – an array ofFlatpak.RemoteTypecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.Remoteinstances- Return type:
Lists only the remotes whose type is included in the types argument.
Since flatpak 1.7 this will never return any types except
Flatpak.RemoteType.STATIC. Equivalent functionallity toFlatpak.RemoteType.USBcan be had by listing remote refs withFlatpak.QueryFlags.ONLY_SIDELOADED.
- list_unused_refs(arch, cancellable)¶
- Parameters:
arch (
strorNone) – if non-None, the architecture of refs to collectcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances- Return type:
Lists the installed references that are not ‘used’.
A reference is used if it is either an application, or the runtime or sdk of a used ref, or an extension of a used ref. Pinned runtimes are also considered used; see flatpak-pin(1) and
Flatpak.Installation.list_pinned_refs().New in version 1.1.2.
- list_unused_refs_with_options(arch, metadata_injection, options, cancellable)¶
- Parameters:
arch (
strorNone) – if non-None, the architecture of refs to collectmetadata_injection ({
object:object} orNone) – if non-None, aGLib.HashTablemapping refs toGLib.KeyFileobjects, which when available will be used instead of installed metadataoptions (
GLib.VariantorNone) – if non-None, aGLib.Varianta{sv} with an extensible set of optionscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
a
GLib.PtrArrayofFlatpak.InstalledRefinstances- Return type:
Like
Flatpak.Installation.list_unused_refs() but supports an extensible set of options as well as an metadata_injection parameter. The following are currently defined:exclude-refs (as): Act as if these refs are not installed even if they are when determining the set of unused refs
filter-by-eol (b): Return refs as unused if they are End-Of-Life. Note that if this option is combined with other filters then non-EOL refs may also be returned.
filter-by-autoprune (b): Return refs as unused if they should be autopruned. Note that if this option is combined with other filters then non-autoprune refs may also be returned.
New in version 1.9.1.
- load_app_overrides(app_id, cancellable)¶
- Parameters:
app_id (
str) – an application idcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
the contents of the overrides files, or
Noneif an error occurred- Return type:
Loads the metadata overrides file for an application.
- modify_remote(remote, cancellable)¶
- Parameters:
remote (
Flatpak.Remote) – the modifiedFlatpak.Remotecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueif the modifications have been committed successfully- Return type:
Saves changes in the remote object.
- prune_local_repo(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
Trueon success- Return type:
Remove all orphaned OSTree objects from the underlying OSTree repo in self.
New in version 0.10.0.
- remove_local_ref_sync(remote_name, ref, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remoteref (
str) – the refcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueon success- Return type:
Remove the OSTree ref given by remote_name:ref from the local flatpak repository. The next time the underlying OSTree repo is pruned, objects which were attached to that ref will be removed. This is useful if you pulled a flatpak ref using
Flatpak.Installation.install_full() and specifiedFlatpak.InstallFlags.NO_DEPLOYbut then decided not to deploy the ref later on and want to remove the local ref to prevent it from taking up disk space. Note that this will not remove the objects referred to by ref from the underlying OSTree repo, you should useFlatpak.Installation.prune_local_repo() to do that.New in version 0.10.0.
- remove_remote(name, cancellable)¶
- Parameters:
name (
str) – the name of the remote to removecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueif the remote has been removed successfully- Return type:
Removes the remote with the given name from the installation.
- run_triggers(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – aGio.Cancellable- Raises:
- Returns:
Trueon success- Return type:
Run the trigger commands to update the files exported by the apps in self. Should be used after one or more app install, upgrade or uninstall operations with the
Flatpak.InstallFlags.NO_TRIGGERS,Flatpak.UpdateFlags.NO_TRIGGERSorFlatpak.UninstallFlags.NO_TRIGGERSflags set.New in version 1.0.3.
- set_config_sync(key, value, cancellable)¶
- Parameters:
key (
str) – the name of the key to setcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueif the option was set correctly- Return type:
Set a global configuration option for the installation, currently the only supported keys are
languages, which is a semicolon-separated list of language codes like"sv;en;pl", or""to mean all languages, andextra-languages, which is a semicolon-separated list of locale identifiers like"en;en_DK;zh_HK.big5hkscs;uz_UZ.utf8@cyrillic".
- set_no_interaction(no_interaction)¶
- Parameters:
no_interaction (
bool) – Whether to disallow interactive authorization for operations
This method can be used to prevent interactive authorization dialogs to appear for operations on self. This is useful for background operations that are not directly triggered by a user action.
By default, interaction is allowed.
New in version 1.1.1.
- uninstall(kind, name, arch, branch, progress, progress_data, cancellable)¶
- Parameters:
kind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app or runtime to uninstallarch (
strorNone) – architecture of the app or runtime to uninstall; ifNone,Flatpak.get_default_arch() is assumedbranch (
strorNone) – name of the branch of the app or runtime to uninstall; ifNone,masteris assumedprogress (
Flatpak.ProgressCallbackorNone) – the callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueon success- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_uninstall() instead. It has a lot more interesting features.Uninstall an application or runtime.
Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_uninstall() instead.
- uninstall_full(flags, kind, name, arch, branch, progress, progress_data, cancellable)¶
- Parameters:
flags (
Flatpak.UninstallFlags) – set ofFlatpak.UninstallFlagsflagskind (
Flatpak.RefKind) – what this ref contains (anFlatpak.RefKind)name (
str) – name of the app or runtime to uninstallarch (
strorNone) – architecture of the app or runtime to uninstall; ifNone,Flatpak.get_default_arch() is assumedbranch (
strorNone) – name of the branch of the app or runtime to uninstall; ifNone,masteris assumedprogress (
Flatpak.ProgressCallbackorNone) – the callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueon success- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_uninstall() instead. It has a lot more interesting features.Uninstall an application or runtime.
New in version 0.11.8.
Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_uninstall() instead.
- update(flags, kind, name, arch, branch, progress, progress_data, cancellable)¶
- Parameters:
flags (
Flatpak.UpdateFlags) – set ofFlatpak.UpdateFlagsflagkind (
Flatpak.RefKind) – whether this is an app or runtimename (
str) – name of the app or runtime to updatearch (
strorNone) – architecture of the app or runtime to update (default: current architecture)branch (
strorNone) – name of the branch of the app or runtime to update (default: master)progress (
Flatpak.ProgressCallbackorNone) – the callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The ref for the newly updated app or
Noneon failure- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_update() instead. It has a lot more interesting features.Update an application or runtime.
If the specified package is not installed, then
Flatpak.Error.NOT_INSTALLEDwill be thrown.If no updates could be found on the remote end and the package is already up to date, then
Flatpak.Error.ALREADY_INSTALLEDwill be thrown.Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_update() instead.
- update_appstream_full_sync(remote_name, arch, progress, progress_data, out_changed, cancellable)¶
- Parameters:
remote_name (
str) – the name of the remotearch (
strorNone) – Architecture to update, orNonefor the local machine archprogress (
Flatpak.ProgressCallbackorNone) – progress callbackprogress_data (
objectorNone) – user data passed to progressout_changed (
boolorNone) – Set toTrueif the contents of the appstream changed,Falseif nothing changedcancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
- Return type:
Updates the local copy of appstream for remote_name for the specified arch.
- update_appstream_sync(remote_name, arch, out_changed, cancellable)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Updates the local copy of appstream for remote_name for the specified arch. If you need progress feedback, use
Flatpak.Installation.update_appstream_full_sync().
- update_full(flags, kind, name, arch, branch, subpaths, progress, progress_data, cancellable)¶
- Parameters:
flags (
Flatpak.UpdateFlags) – set ofFlatpak.UpdateFlagsflagkind (
Flatpak.RefKind) – whether this is an app or runtimename (
str) – name of the app or runtime to updatearch (
strorNone) – architecture of the app or runtime to update (default: current architecture)branch (
strorNone) – name of the branch of the app or runtime to update (default: master)subpaths ([
str] orNone) – A list of subpaths to fetch, orNonefor everythingprogress (
Flatpak.ProgressCallbackorNone) – the callbackprogress_data (
objectorNone) – user data passed to progresscancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
The ref for the newly updated app or
Noneon failure- Return type:
This is an old deprecated function, you should use
Flatpak.TransactionandFlatpak.Transaction.add_update() instead. It has a lot more interesting features.Update an application or runtime.
If the specified package is not installed, then
Flatpak.Error.NOT_INSTALLEDwill be thrown.If no updates could be found on the remote end and the package is already up to date, then
Flatpak.Error.ALREADY_INSTALLEDwill be thrown.Deprecated since version 1.7.0: Use
Flatpak.Transaction.add_update() instead.
- update_remote_sync(name, cancellable)¶
- Parameters:
name (
str) – the name of the remote to updatecancellable (
Gio.CancellableorNone) – aGio.Cancellable
- Raises:
- Returns:
Trueif the remote has been updated successfully- Return type:
Updates the local configuration of a remote repository by fetching the related information from the summary file in the remote OSTree repository and committing the changes to the local installation.
New in version 0.6.13.