dnf5daemon-dbus-api - Man Page
DBus API Reference for Dnf5daemon
Synopsis
Dbus methods and arguments. Generated from dbus XMLs.
Description
Note: While most of the following methods can be invoked successfully by a regular user, authentication by an administrative user is required for some of them (e.g. Goal.do_transaction(), Repo.confirm_key(), Repo.enable(), Repo.disable()). This authentication is managed by calling CheckAuthorization() method of the org.freedesktop.PolicyKit1.Authority Polkit D-Bus interface. The AllowUserInteraction flag is set for this call, indicating that if an authentication agent is available, the call is blocked while the user is prompted to authenticate. A hardcoded timeout of 2 minutes is set for the user interaction.
Interfaces
org.rpm.dnf.v0.Goal interface
- interface org.rpm.dnf.v0.Goal
- method resolve(a{sv} options) -> (a(sssa{sv}a{sv}) transaction_items, u result)
- Arguments
- options (a{sv}) -- an array of key/value pairs to modify dependency resolving
- Returns
- transaction_items (a(sssa{sv}a{sv})) -- array of (object_type, action, reason, {transaction_item_attributes}, {object}) tuples. object_type is one of libdnf5::transaction::TransactionItemType, action is one of libdnf5::transaction::TransactionItemAction, reason is one of libdnf5::transaction::TransactionItemReason enums. Each of these enums are represented as strings using corresponding libdnf5::transaction::*_to_string() methods. transaction_item_attributes is a map {attribute: value}. Currently "reason_change_group_id" attribute is used for target group id in case the action is ReasonChange and the reason Group, and "replaces" containing a vector of packages ids being replaced by this item. Finally the object is a map {attribute: value} and represents (according to object_type) package, group, environment, or module. These package attributes are returned: "name", "epoch", "version", "release", "arch", "repo_id", "from_repo_id", "package_size", "install_size", "evr", and "reason". For groups the object contains "groupid" and "name" attributes.
- result (u) -- problems detected during transaction resolving. Possible values are 0 - no problem, 1 - no problem, but some info / warnings are present or 2 - resolving failed.
Resolve the transaction.
- Following @options are supported:
- allow_erasing: boolean, default false
Whether removal of installed package is allowed to resolve the transaction.
Unknown options are ignored.
- method get_transaction_problems_string() -> (as problems)
- Returns
- problems (as) -- array of strings containing all problems found during the transaction resolution.
Return all problems found during the transaction resolution as human readable messages.
- method get_transaction_problems() -> (aa{sv} problems)
- Returns
- problems (aa{sv}) -- array of {key: value} maps
Return all problems found during the transaction resolution as structures. This is the list of problem keys: always present: action - see include/libdnf5/base/goal_elements.hpp: GoalAction problem - see include/libdnf5/base/goal_elements.hpp: GoalProblem optional: goal_job_settings - {string: variant}, settings used to resolve the goal spec - string, usually nevra of affected package additional_data - array of strings, more details on the problem solver_problems - problems reported by underlying libsolv
- method do_transaction(a{sv} options) -> ()
- Arguments
- options (a{sv}) -- an array of key/value pairs to modify transaction running
Perform the resolved transaction.
- Following @options are supported:
- comment: string
Adds a comment to a transaction.
Unknown options are ignored.
org.rpm.dnf.v0.SessionManager interface
- interface org.rpm.dnf.v0.SessionManager
- method open_session(a{sv} options) -> (o session_object_path)
- Arguments
- options (a{sv}) -- session configuration - an array of key/value pairs
- Returns
- session_object_path (o) -- object path to created Session object
Opens a new session.
Following configuration options are supported:
- load_system_repo: bool, default true
If true information about currently installed packages is loaded.
- load_available_repos: bool, default true
If true information about packages available in enabled repositories is loaded.
- config: map {string: string}
Override configuration options.
- releasever: string
Override releasever variable used for substitutions in repository configurations.
- locale: string
Override server locale for this session. Affects language used in various error messages.
Unknown options are ignored.
- method close_session(o session_object_path) -> (b success)
- Arguments
- session_object_path (o) -- object path of session to close
- Returns
- success (b) -- bool whether the requested session was successfully closed
Close session on given object path.
org.rpm.dnf.v0.rpm.Repo interface
- interface org.rpm.dnf.v0.rpm.Repo
- method list(a{sv} options) -> (aa{sv} repositories)
- Arguments
- options (a{sv}) -- an array of key/value pairs
- Returns
- repositories (aa{sv}) -- array of returned repositories with requested attributes
Get list of repositories that match to given filters.
Following options are supported:
- patterns: list of strings
any repository with id matching to any of patterns is returned
- repo_attrs: list of strings
list of repository attributes that are returned
- enable_disable: string (default "enabled")
When set to "enabled" or "disabled", only enabled / disabled repositories are listed. Any other value means all repositories are returned.
Unknown options are ignored.
- method confirm_key(s key_id, b confirmed) -> ()
- Arguments
- key_id (s) -- id of the key in question
- confirmed (b) -- whether the key import is confirmed by user
Confirm repository PGP key import.
- method enable(as repo_ids) -> ()
- Arguments
- repo_ids (as) -- array of strings containing all repo ids to be enabled
Enable repositories based on the list of given ids.
- method disable(as repo_ids) -> ()
- Arguments
- repo_ids (as) -- array of strings containing all repo ids to be disabled
Disable repositories based on the list of given ids.
org.rpm.dnf.v0.rpm.Rpm interface
- interface org.rpm.dnf.v0.rpm.Rpm
- method list(a{sv} options) -> (aa{sv} packages)
- Arguments
- options (a{sv}) -- an array of key/value pairs
- Returns
- packages (aa{sv}) -- array of returned packages with requested attributes
Get list of packages that match to given filters. Since the method returns packages directly in the D-Bus method reply message, which has a limited size, there is a possibility that the requested package set size would exceed this limit. If you request a large number of packages and/or a great number of package attributes, please consider using the list_fd() method.
Following options and filters are supported:
- package_attrs: list of strings
list of package attributes that are returned. Supported attributes are name, epoch, version, release, arch, repo_id, from_repo_id, is_installed, install_size, download_size, buildtime, sourcerpm, summary, url, license, description, files, changelogs, provides, requires, requires_pre, conflicts, obsoletes, recommends, suggests, enhances, supplements, evr, nevra, full_nevra, reason, vendor, group.
- with_nevra: bool (default true)
match patterns against available packages NEVRAs
- with_provides: bool (default true)
match patterns against available packages provides
- with_filenames: bool (default true)
match patterns against names of the files in available packages
- with_binaries: bool (default true)
match patterns against names of the binaries in /usr/(s)bin in available packages
- with_src: bool (default true)
include source rpms into the results
- icase: bool (default true)
ignore case while matching patterns
- patterns: list of strings
any package matching to any of patterns is returned
- scope: string (default "all")
limit packages to one of "all", "installed", "available", "upgrades", "upgradable"
- arch: list of strings
limit the resulting set only to packages of given architectures
- repo: list of strings
limit the resulting set only to packages from given repositories
- latest-limit: int
limit the resulting set to only <limit> of latest packages for every name and architecture
- whatprovides: list of strings
limit the resulting set only to packages that provide any of given capabilities
- whatdepends: list of strings
limit the resulting set only to packages that require, enhance, recommend, suggest or supplement any of given capabilities
- whatrequires: list of strings
limit the resulting set only to packages that require any of given capabilities
- whatrecommends: list of strings
limit the resulting set only to packages that recommend any of given capabilities
- whatenhances: list of strings
limit the resulting set only to packages that enhance any of given capabilities
- whatsuggests: list of strings
limit the resulting set only to packages that suggest any of given capabilities
- whatsupplements: list of strings
limit the resulting set only to packages that supplement any of given capabilities
- whatobsoletes: list of strings
limit the resulting set only to packages that obsolete any of given capabilities
- whatconflicts: list of strings
limit the resulting set only to packages that conflict with any of given capabilities
Unknown options are ignored.
- method list_fd(a{sv} options, h file_descriptor) -> (s transfer_id)
- Arguments
- options (a{sv}) -- an array of key/value pairs
- file_descriptor (h) -- File descriptor opened for writing used to transfer data
- Returns
- transfer_id (s) -- Identifier of this transfer. Used for signaling the end of transfer.
Retrieve a list of packages that match the provided filters. Packages are transmitted as a stream of JSON objects, with each JSON object representing one package as a dictionary. This stream is then written into the given file_descriptor. Unlike the list() method, this approach does not encounter issues with large output data. The server has a 30-second timeout during which it waits for the client to read data from the pipe if the pipe is full.
The same options as in list() method are supported.
- method install(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- an array of package specifications to be installed on the system
- options (a{sv}) -- an array of key/value pairs to modify install behavior
Mark packages specified by @pkg_specs for installation.
Following @options are supported:
- repo_ids: list of strings
Identifiers of the repos from which the packages could be installed.
- skip_broken: boolean, default false
Whether solver can skip packages with broken dependencies to resolve transaction
- skip_unavailable: boolean, default false
Whether nonexisting packages can be skipped.
Unknown options are ignored.
- method upgrade(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- an array of package specifications to be upgraded on the system
- options (a{sv}) -- an array of key/value pairs to modify upgrade behavior
Mark packages specified by @pkg_specs for upgrade.
Following @options are supported:
- repo_ids: list of strings
Identifiers of the repos from which the packages could be upgraded.
Unknown options are ignored.
- method remove(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- an array of package specifications to be removed on the system
- options (a{sv}) -- an array of key/value pairs to modify remove behavior
Mark packages specified by @pkg_specs for removal.
Unknown options are ignored.
- method distro_sync(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- array of package specifications to synchronize to the latest available versions
- options (a{sv}) -- an array of key/value pairs to modify distro_sync behavior
Following @options are supported:
Unknown options are ignored.
- method downgrade(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- an array of package specifications to be downgraded on the system
- options (a{sv}) -- an array of key/value pairs to modify downgrade behavior
Mark packages specified by @pkg_specs for downgrade.
Following @options are supported:
Unknown options are ignored.
- method reinstall(as pkg_specs, a{sv} options) -> ()
- Arguments
- pkg_specs (as) -- an array of package specifications to be reinstalled on the system
- options (a{sv}) -- an array of key/value pairs to modify reinstall behavior
Mark packages specified by @pkg_specs for reinstall.
Following @options are supported:
Unknown options are ignored.
- signal transaction_elem_progress(o session_object_path, s nevra, t processed, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package
- processed (t) -- amount already processed
- total (t) -- total to process
Overall progress in transaction item processing. Called right before an item is processed.
- signal transaction_before_begin(o session_object_path, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- total (t) -- number of elements in the rpm transaction
Send right before the rpm transaction is run.
- signal transaction_after_complete(o session_object_path, b success)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- success (b) -- true if the rpm transaction was completed successfully
Send right after the rpm transaction run finished.
- signal transaction_action_start(o session_object_path, s nevra, u action, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package
- action (u) -- one of the dnfdaemon::RpmTransactionItem::Actions enum
- total (t) -- total to process
Processing (installation or removal) of the package has started.
- signal transaction_action_progress(o session_object_path, s nevra, t processed, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package
- processed (t) -- amount already processed
- total (t) -- total to process
Progress in processing of the package.
- signal transaction_action_stop(o session_object_path, s nevra, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package
- total (t) -- total processed
Processing of the package has finished.
- signal transaction_script_start(o session_object_path, s nevra, u scriptlet_type)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package script belongs to
- scriptlet_type (u) -- scriptlet type that started (pre, post,...)
The scriptlet has started.
- signal transaction_script_stop(o session_object_path, s nevra, u scriptlet_type, t return_code)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package script belongs to
- scriptlet_type (u) -- scriptlet type that started (pre, post,...)
- return_code (t) -- return value of the script
The scriptlet has successfully finished.
- signal transaction_script_error(o session_object_path, s nevra, u scriptlet_type, t return_code)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package script belongs to
- scriptlet_type (u) -- scriptlet type that started (pre, post,...)
- return_code (t) -- return value of the script
The scriptlet has finished with an error.
- signal transaction_verify_start(o session_object_path, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- total (t) -- total to process
Package files verification has started.
- signal transaction_verify_progress(o session_object_path, t processed, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- processed (t) -- amount already processed
- total (t) -- total to process
Progress in processing of the package.
- signal transaction_verify_stop(o session_object_path, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- total (t) -- total to process
Package files verification has finished.
- signal transaction_transaction_start(o session_object_path, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- total (t) -- total to process
Preparation of transaction packages has started.
- signal transaction_transaction_progress(o session_object_path, t processed, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- processed (t) -- amount already processed
- total (t) -- total to process
Progress in preparation of transaction packages.
- signal transaction_transaction_stop(o session_object_path, t total)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- total (t) -- total to process
Preparation of transaction packages has finished.
- signal transaction_unpack_error(o session_object_path, s nevra)
- Arguments
- session_object_path (o) -- object path of the dnf5daemon session
- nevra (s) -- full NEVRA of the package
Error while unpacking the package.
- signal write_to_fd_finished(b success, s transfer_id, s error_msg)
- Arguments
- success (b) -- true if the transfer finished successfully
- transfer_id (s) -- id of the finished transfer
- error_msg (s) -- error message if the transfer was not successful.
Notify the user that writing to the file descriptor with given transfer_id has finished and the descriptor has been closed.
org.rpm.dnf.v0.comps.Group interface
- interface org.rpm.dnf.v0.comps.Group
- method list(a{sv} options) -> (aa{sv} groups)
- Arguments
- options (a{sv}) -- an array of key/value pairs
- Returns
- groups (aa{sv}) -- array of returned groups with requested attributes
Get list of groups that match to given filters.
Following options and filters are supported:
- attributes: list of strings
list of group attributes that are returned
- match_group_id: bool (default true)
match patterns against ids of the groups
- match_group_name: bool (default false)
match patterns against names of the groups
- scope: string (default "all")
limit groups to one of "all", "installed", "available"
- with_hidden: bool (default false)
include hidden groups into the result
- patterns: list of strings
any group matching to any of patterns is returned
- contains_pkgs: list of strings
include only groups containing given packages
Unknown options are ignored.
org.rpm.dnf.v0.Advisory interface
- interface org.rpm.dnf.v0.Advisory
- method list(a{sv} options) -> (aa{sv} advisories)
- Arguments
- options (a{sv}) -- an array of key/value pairs
- Returns
- advisories (aa{sv}) -- array of returned advisories with requested attributes
Get list of security advisories that match to given filters.
Following options and filters are supported:
- advisory_attrs: list of strings
List of advisory attributes that are returned in advisories array. Supported attributes are "advisoryid", "name", "title", "type", "severity", "status", "vendor", "description", "buildtime", "message", "rights", "collections", and "references".
- availability: string, default "available"
Limit returned advisories based on their relation to installed packages. Accepted values are
- "available" to return only advisories containing newer versions of installed packages
- "all" - to return all advisories
- "installed" - to return only advisories containing equal or older versions of installed packages
- "updates" - to return only advisories containing newer versions of installed packages for which an update is available
- names: list of strings
Consider only advisories with one of given names.
- types: list of strings
Consider only advisories of given types. Possible types are "security", "bugfix", "enhancement", and "newpackage".
- contains_pkgs: list of strings
Consider only advisories containing one of given packages.
- severities: list of strings
Consider only advisories of given severity. Possible values are "critical", "important", "moderate", "low", and "none".
- reference_bzs: list of strings
Consider only advisories referencing given Bugzilla ticket ID. Expected values are numeric IDs, e.g. 123456.
- reference_cves: list of strings
Consider only advisoried referencing given CVE ID. Expected values are strings IDs in CVE format, e.g. CVE-2201-0123.
- with_bz: boolean, default False
Consider only advisories referencing a Bugzilla ticket.
- with_cve: boolean, default False
Consider only advisories referencing a CVE ticket.
Unknown options are ignored.
Author
See AUTHORS.md in dnf5 source distribution.
Copyright
Contributors to the dnf5 project.