Trait libflatpak::prelude::InstallationExt
source · pub trait InstallationExt:
IsA<Installation>
+ Sealed
+ 'static {
Show 44 methods
// Provided methods
fn add_remote(
&self,
remote: &impl IsA<Remote>,
if_needed: bool,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn cleanup_local_refs_sync(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn create_monitor(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileMonitor, Error> { ... }
fn drop_caches(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn fetch_remote_metadata_sync(
&self,
remote_name: &str,
ref_: &impl IsA<Ref>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Bytes, Error> { ... }
fn fetch_remote_ref_sync(
&self,
remote_name: &str,
kind: RefKind,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error> { ... }
fn fetch_remote_ref_sync_full(
&self,
remote_name: &str,
kind: RefKind,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
flags: QueryFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error> { ... }
fn fetch_remote_size_sync(
&self,
remote_name: &str,
ref_: &impl IsA<Ref>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(u64, u64), Error> { ... }
fn config(
&self,
key: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<GString, Error> { ... }
fn current_installed_app(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<InstalledRef, Error> { ... }
fn default_languages(&self) -> Result<Vec<GString>, Error> { ... }
fn default_locales(&self) -> Result<Vec<GString>, Error> { ... }
fn display_name(&self) -> Option<GString> { ... }
fn id(&self) -> Option<GString> { ... }
fn installed_ref(
&self,
kind: RefKind,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<InstalledRef, Error> { ... }
fn is_user(&self) -> bool { ... }
fn min_free_space_bytes(&self) -> Result<u64, Error> { ... }
fn is_no_interaction(&self) -> bool { ... }
fn path(&self) -> Option<File> { ... }
fn priority(&self) -> i32 { ... }
fn remote_by_name(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Remote, Error> { ... }
fn storage_type(&self) -> StorageType { ... }
fn install_ref_file(
&self,
ref_file_data: &Bytes,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error> { ... }
fn launch(
&self,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
commit: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn list_installed_refs(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error> { ... }
fn list_installed_refs_by_kind(
&self,
kind: RefKind,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error> { ... }
fn list_installed_refs_for_update(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error> { ... }
fn list_installed_related_refs_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RelatedRef>, Error> { ... }
fn list_pinned_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error> { ... }
fn list_remote_refs_sync(
&self,
remote_or_uri: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RemoteRef>, Error> { ... }
fn list_remote_refs_sync_full(
&self,
remote_or_uri: &str,
flags: QueryFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RemoteRef>, Error> { ... }
fn list_remote_related_refs_for_installed_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RelatedRef>, Error> { ... }
fn list_remote_related_refs_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RelatedRef>, Error> { ... }
fn list_remotes(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<Remote>, Error> { ... }
fn list_unused_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error> { ... }
fn load_app_overrides(
&self,
app_id: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<GString, Error> { ... }
fn modify_remote(
&self,
remote: &impl IsA<Remote>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn prune_local_repo(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn remove_local_ref_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn remove_remote(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn run_triggers(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn set_config_sync(
&self,
key: &str,
value: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
fn set_no_interaction(&self, no_interaction: bool) { ... }
fn update_remote_sync(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error> { ... }
}
Expand description
Provided Methods§
sourcefn add_remote(
&self,
remote: &impl IsA<Remote>,
if_needed: bool,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn add_remote( &self, remote: &impl IsA<Remote>, if_needed: bool, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Adds a new remote
object to the set of remotes. This is similar
to modify_remote()
for non-existing remote
names. However, if the named remote already exists then instead of
modifying it it fails with Error::AlreadyInstalled
, 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 Remote::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.
§remote
the new Remote
§if_needed
if true
, only add if it doesn’t exists
§cancellable
§Returns
true
if the modifications have been committed successfully
sourcefn cleanup_local_refs_sync(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn cleanup_local_refs_sync( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
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 InstallationExtManual::install_full()
and
specified InstallFlags::NO_DEPLOY
but 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 use
prune_local_repo()
to do that.
§cancellable
§Returns
true
on success
sourcefn create_monitor(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<FileMonitor, Error>
fn create_monitor( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<FileMonitor, Error>
Gets monitor object for the installation. The returned file monitor will
emit the changed
signal whenever an application or runtime
was installed, uninstalled or updated.
§cancellable
§Returns
a new gio::FileMonitor
instance, or None
on error
sourcefn drop_caches(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn drop_caches( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
sourcefn fetch_remote_metadata_sync(
&self,
remote_name: &str,
ref_: &impl IsA<Ref>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Bytes, Error>
fn fetch_remote_metadata_sync( &self, remote_name: &str, ref_: &impl IsA<Ref>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Bytes, Error>
Obtains the metadata file from a commit.
NOTE: Since 0.11.4 this information is accessible in FlatpakRemoteRef, so this function is not very useful anymore.
§remote_name
the name of the remote
§ref_
the ref
§cancellable
§Returns
a glib::Bytes
containing the flatpak metadata file,
or None
if an error occurred
sourcefn fetch_remote_ref_sync(
&self,
remote_name: &str,
kind: RefKind,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error>
fn fetch_remote_ref_sync( &self, remote_name: &str, kind: RefKind, name: &str, arch: Option<&str>, branch: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<RemoteRef, Error>
Gets the current remote branch of a ref in the remote.
§remote_name
the name of the remote
§kind
what this ref contains (an RefKind
)
§name
name of the app/runtime to fetch
§arch
which architecture to fetch (default: current architecture)
§branch
which branch to fetch (default: ‘master’)
§cancellable
§Returns
sourcefn fetch_remote_ref_sync_full(
&self,
remote_name: &str,
kind: RefKind,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
flags: QueryFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error>
fn fetch_remote_ref_sync_full( &self, remote_name: &str, kind: RefKind, name: &str, arch: Option<&str>, branch: Option<&str>, flags: QueryFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<RemoteRef, Error>
Gets the current remote branch of a ref in the remote.
§remote_name
the name of the remote
§kind
what this ref contains (an RefKind
)
§name
name of the app/runtime to fetch
§arch
which architecture to fetch (default: current architecture)
§branch
which branch to fetch (default: ‘master’)
§flags
set of QueryFlags
§cancellable
§Returns
sourcefn fetch_remote_size_sync(
&self,
remote_name: &str,
ref_: &impl IsA<Ref>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(u64, u64), Error>
fn fetch_remote_size_sync( &self, remote_name: &str, ref_: &impl IsA<Ref>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(u64, u64), Error>
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 FlatpakRemoteRef, so this function is not very useful anymore.
§remote_name
the name of the remote
§ref_
the ref
§cancellable
§Returns
true
, unless an error occurred
§download_size
return location for the (maximum) download size
§installed_size
return location for the installed size
sourcefn config(
&self,
key: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<GString, Error>
fn config( &self, key: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<GString, Error>
Get a global configuration option for the installation, see
set_config_sync()
for supported keys.
§key
the name of the key to get
§cancellable
§Returns
The (newly allocated) value, or None
on error (G_KEY_FILE_ERROR_KEY_NOT_FOUND
error if key is not set)
sourcefn current_installed_app(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<InstalledRef, Error>
fn current_installed_app( &self, name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<InstalledRef, Error>
Get the last build of reference name
that was installed with
InstallationExtManual::install()
, or None
if the reference has
never been installed locally.
§name
the name of the app
§cancellable
§Returns
an InstalledRef
sourcefn default_languages(&self) -> Result<Vec<GString>, Error>
fn default_languages(&self) -> Result<Vec<GString>, Error>
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.
§Returns
A possibly empty array of strings, or None
on error.
sourcefn default_locales(&self) -> Result<Vec<GString>, Error>
fn default_locales(&self) -> Result<Vec<GString>, Error>
Like default_languages()
but includes territory
information (e.g. en_US
rather than en
) which may be included in the
extra-languages
configuration.
Strings returned by this function are in the format specified by
setlocale()
: language[_territory][.codeset][
modifier]
.
§Returns
A possibly empty array of locale strings, or None
on error.
sourcefn display_name(&self) -> Option<GString>
fn display_name(&self) -> Option<GString>
sourcefn id(&self) -> Option<GString>
fn id(&self) -> Option<GString>
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”.
§Returns
a string with the installation’s ID
fn installed_ref( &self, kind: RefKind, name: &str, arch: Option<&str>, branch: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<InstalledRef, Error>
sourcefn min_free_space_bytes(&self) -> Result<u64, Error>
fn min_free_space_bytes(&self) -> Result<u64, Error>
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.
§Returns
true
on success, or false
on error.
§out_bytes
Location to store the result
sourcefn is_no_interaction(&self) -> bool
fn is_no_interaction(&self) -> bool
Returns the value set with set_no_interaction()
.
§Returns
true
if interactive authorization dialogs are not allowed
sourcefn priority(&self) -> i32
fn priority(&self) -> i32
Returns the numeric priority of the installation for self
.
§Returns
an integer with the configured priority value
sourcefn remote_by_name(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Remote, Error>
fn remote_by_name( &self, name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Remote, Error>
sourcefn storage_type(&self) -> StorageType
fn storage_type(&self) -> StorageType
sourcefn install_ref_file(
&self,
ref_file_data: &Bytes,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<RemoteRef, Error>
👎Deprecated: Since 1.7
fn install_ref_file( &self, ref_file_data: &Bytes, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<RemoteRef, Error>
This is an old deprecated function, you should use
Transaction
and TransactionExt::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 RemoteRef
that can be used
to install it.
Note, the RemoteRef
will not have the commit field set, or other details, to
avoid unnecessary roundtrips. If you need that you have to resolve it
explicitly with flatpak_installation_fetch_remote_ref_sync ().
§Deprecated since 1.7
Use TransactionExt::add_install_flatpakref()
instead.
§ref_file_data
The ref file contents
§cancellable
§Returns
a RemoteRef
if the remote has been added successfully, None
on error.
sourcefn launch(
&self,
name: &str,
arch: Option<&str>,
branch: Option<&str>,
commit: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn launch( &self, name: &str, arch: Option<&str>, branch: Option<&str>, commit: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Launch an installed application.
You can use flatpak_installation_get_installed_ref()
or
current_installed_app()
to find out what builds
are available, in order to get a value for commit
.
§name
name of the app to launch
§arch
which architecture to launch (default: current architecture)
§branch
which branch of the application (default: “master”)
§commit
the commit of branch
to launch
§cancellable
§Returns
true
, unless an error occurred
sourcefn list_installed_refs(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error>
fn list_installed_refs( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<InstalledRef>, Error>
sourcefn list_installed_refs_by_kind(
&self,
kind: RefKind,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error>
fn list_installed_refs_by_kind( &self, kind: RefKind, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<InstalledRef>, Error>
Lists the installed references of a specific kind.
§kind
the kind of installation
§cancellable
§Returns
a GPtrArray of
InstalledRef
instances
sourcefn list_installed_refs_for_update(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error>
fn list_installed_refs_for_update( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<InstalledRef>, Error>
Lists the installed apps and runtimes that have an update available, either
from the configured remote or locally available but not deployed (see
TransactionExt::set_no_deploy()
).
This also checks if any of InstalledRef
has a missing RelatedRef
(which has should-download
set to true
) or runtime. If so, it adds the
ref to the returning [glib::PtrArray
][crate::glib::PtrArray] to pull in the RelatedRef
or runtime
again via an update operation in Transaction
.
In case more than one app needs an update of the same runtime or extension, this function will return all of those apps.
§cancellable
§Returns
a GPtrArray of
InstalledRef
instances, or None
on error
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 use FLATPAK_UPDATE_FLAGS_NO_PULL to install previously pulled refs.
§remote_name
the name of the remote providing ref_
§ref_
the ref
§cancellable
§Returns
a GPtrArray of
RelatedRef
instances
sourcefn list_pinned_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error>
fn list_pinned_refs( &self, arch: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<InstalledRef>, Error>
Lists the installed references that are pinned, meaning they will not be
returned by 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).
§arch
if non-None
, the architecture of refs to collect
§cancellable
§Returns
a GPtrArray of
InstalledRef
instances
sourcefn list_remote_refs_sync(
&self,
remote_or_uri: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RemoteRef>, Error>
fn list_remote_refs_sync( &self, remote_or_uri: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<RemoteRef>, Error>
sourcefn list_remote_refs_sync_full(
&self,
remote_or_uri: &str,
flags: QueryFlags,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<RemoteRef>, Error>
fn list_remote_refs_sync_full( &self, remote_or_uri: &str, flags: QueryFlags, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<RemoteRef>, Error>
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
list_remote_related_refs_sync()
and
list_installed_related_refs_sync()
.
The returned list contains all available related refs, but not
every one should always be installed. For example,
RelatedRefExt::should_download()
returns true
if the
reference should be installed/updated with the app, and
RelatedRefExt::should_delete()
returns true
if it
should be uninstalled with the main ref.
The commit property of each RelatedRef
is not guaranteed to be
non-None
.
§remote_name
the name of the remote
§ref_
the ref
§cancellable
§Returns
a GPtrArray of
RelatedRef
instances
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,
RelatedRefExt::should_download()
returns true
if the
reference should be installed/updated with the app, and
RelatedRefExt::should_delete()
returns true
if it
should be uninstalled with the main ref.
The commit property of each RelatedRef
is not guaranteed to be
non-None
.
§remote_name
the name of the remote
§ref_
the ref
§cancellable
§Returns
a GPtrArray of
RelatedRef
instances
sourcefn list_remotes(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<Remote>, Error>
fn list_remotes( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<Remote>, Error>
sourcefn list_unused_refs(
&self,
arch: Option<&str>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<Vec<InstalledRef>, Error>
fn list_unused_refs( &self, arch: Option<&str>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<Vec<InstalledRef>, Error>
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
list_pinned_refs()
.
§arch
if non-None
, the architecture of refs to collect
§cancellable
§Returns
a GPtrArray of
InstalledRef
instances
sourcefn load_app_overrides(
&self,
app_id: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<GString, Error>
fn load_app_overrides( &self, app_id: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<GString, Error>
sourcefn modify_remote(
&self,
remote: &impl IsA<Remote>,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn modify_remote( &self, remote: &impl IsA<Remote>, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
sourcefn prune_local_repo(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn prune_local_repo( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
sourcefn remove_local_ref_sync(
&self,
remote_name: &str,
ref_: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn remove_local_ref_sync( &self, remote_name: &str, ref_: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
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 InstallationExtManual::install_full()
and
specified InstallFlags::NO_DEPLOY
but 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 use
prune_local_repo()
to do that.
§remote_name
the name of the remote
§ref_
the ref
§cancellable
§Returns
true
on success
sourcefn remove_remote(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn remove_remote( &self, name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
sourcefn run_triggers(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn run_triggers( &self, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
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 InstallFlags::NO_TRIGGERS
,
UpdateFlags::NO_TRIGGERS
or UninstallFlags::NO_TRIGGERS
flags set.
§cancellable
§Returns
true
on success
sourcefn set_config_sync(
&self,
key: &str,
value: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_config_sync( &self, key: &str, value: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
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,
and extra-languages
, which is a semicolon-separated list of locale
identifiers like "en;en_DK;zh_HK.big5hkscs;uz_UZ.utf8
cyrillic"
.
§key
the name of the key to set
§value
the new value, or None
to unset
§cancellable
§Returns
true
if the option was set correctly
sourcefn set_no_interaction(&self, no_interaction: bool)
fn set_no_interaction(&self, no_interaction: bool)
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.
§no_interaction
Whether to disallow interactive authorization for operations
sourcefn update_remote_sync(
&self,
name: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn update_remote_sync( &self, name: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
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.
§name
the name of the remote to update
§cancellable
§Returns
true
if the remote has been updated successfully