DNF5DAEMON-DBUS-API(8)
π DNF5DAEMON-DBUS-API π
hiii bestie π«Ά okay so this is the manual page for dnf5daemon-dbus-api, and it lives in the dnf5 corner of the system (section 8, the sysadmin section, very main character energy π). It's the DBus API Reference for Dnf5daemon and ngl it's a chonker, so we're doing it in pieces. Buckle up. β¨
πΈ NAME πΈ
dnf5daemon-dbus-api β DBus API Reference for Dnf5daemon
π SYNOPSIS π
D-Bus methods and arguments. Generated from D-Bus XMLs.
π¦ DESCRIPTION π¦
okay so first thing, and this is important bestie, listen up π
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()).
Like, most of it you can just do, no big deal. But the spicy ones? Those need the admin password moment π. 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. And β no cap β a hardcoded timeout of 2 minutes is set for the user interaction. So don't go making a sandwich mid-prompt, the clock is literally ticking β°.
π INTERFACES π
π org.rpm.dnf.v0.SessionManager interface
interface org.rpm.dnf.v0.SessionManager
method open_session
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. Fresh start, clean slate, new era π«.
Following configuration options are supported:
load_system_repo: bool, defaulttrue- If
trueinformation about currently installed packages is loaded.
- If
load_available_repos: bool, defaulttrue- If
trueinformation about packages available in enabled repositories is loaded.
- If
config: map {string: string}- Override configuration options.
releasever: string- Override
releasevervariable used for substitutions in repository configurations.
- Override
locale: string- Override server locale for this session. Affects language used in various error messages.
Unknown options are ignored. (they get the silent treatment, it's giving ghosting π)
method close_session
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. bye bestie π
π§ org.rpm.dnf.v0.Base interface
interface org.rpm.dnf.v0.Base
method read_all_repos
method read_all_repos() -> (b success)
Returns
success(b) βtrueif repositories were successfully loaded,falseotherwise.
Explicitly ask for loading repositories metadata. Like, just go get it, on purpose, right now β¨.
method clean_with_options
method clean_with_options(s cache_type, a{sv} options) -> (b success, s error_msg)
Arguments
cache_type(s) β cache type to clean up. Supported types are"all","packages","metadata","dbcache", and"expire-cache".options(a{sv}) β an array of key/value pairs to modify the call behavior
Returns
success(b) βtrueif the cache was successfully cleaned,falseotherwise.error_msg(s) β string, contains errors encountered while cleaning the cache.
Remove or expire cached data. spring cleaning but for bytes π§ΉπΈ
Following @options are supported:
interactive: boolean, defaulttrue- Set to
"true", when the operation is done by a user, thus user interaction like password prompts can be done.
- Set to
Unknown options are ignored. (again with the ghosting, iconic honestly)
method clean
method clean(s cache_type) -> (b success, s error_msg)
Arguments
cache_type(s) β cache type to clean up. Supported types are"all","packages","metadata","dbcache", and"expire-cache".
Returns
success(b) βtrueif the cache was successfully cleaned,falseotherwise.error_msg(s) β string, contains errors encountered while cleaning the cache.
Remove or expire cached data.
This is equivalent to call "clean_with_options()" with empty options. It's the low-effort version of the same slay π
.
method reset
method reset() -> (b success, s error_msg)
Returns
success(b) βtrueif the session was successfully reset,falseotherwise.error_msg(s) β string, contains errors encountered while resetting the session
Completely reset the session. total factory reset, no crumbs left π₯
signal download_add_new
signal download_add_new(o session_object_path, s download_id, s description, x total_to_download)
Arguments
session_object_path(o) β object path of thednf5daemonsessiondownload_id(s) β unique id of downloaded object (repo or package)description(s) β the description of the downloaded objecttotal_to_download(x) β total bytes to download
A new download has started. it's happening!! π
signal download_progress
signal download_progress(o session_object_path, s download_id, x total_to_download, x downloaded)
Arguments
session_object_path(o) β object path of thednf5daemonsessiondownload_id(s) β unique id of downloaded object (repo or package)total_to_download(x) β total bytes to downloaddownloaded(x) β bytes already downloaded
Progress in downloading. we love a little character development arc πβ¨
signal download_mirror_failure
signal download_mirror_failure(o session_object_path, s download_id, s message, s url, s metadata)
Arguments
session_object_path(o) β object path of thednf5daemonsessiondownload_id(s) β unique id of downloaded object (repo or package)message(s) β an error messageurl(s) β URL being downloadedmetadata(s) β For repository metadata download contains metadata type
Mirror failure during the download. π not the mirror, she's not mirroring bestie
signal download_end
signal download_end(o session_object_path, s download_id, u transfer_status, s message)
Arguments
session_object_path(o) β object path of thednf5daemonsessiondownload_id(s) β unique id of downloaded object (repo or package)transfer_status(u) βlibdnf5::repo::DownloadCallbacks::TransferStatus(0 - successful, 1 - already exists, 2 - error)message(s) β error message in case of failed download
Downloading has ended. and that's the periodt on that one π
signal repo_key_import_request
signal repo_key_import_request(o session_object_path, s key_id, as user_ids, s key_fingerprint, s key_url, x timestamp)
Arguments
session_object_path(o) β object path of thednf5daemonsessionkey_id(s) β OpenPGP key iduser_ids(as) β User idkey_fingerprint(s) β Fingerprint of the OpenPGP keykey_url(s) β URL of the OpenPGP keytimestamp(x) β timestamp when the key was created
Request for repository key import confirmation. so like, do you trust this key or not, decide π«Ά
signal repo_key_imported
signal repo_key_imported(o session_object_path, s key_id, as user_ids, s key_fingerprint, s key_url, x timestamp)
Arguments
session_object_path(o) β object path of thednf5daemonsessionkey_id(s) β OpenPGP key iduser_ids(as) β User idkey_fingerprint(s) β Fingerprint of the OpenPGP keykey_url(s) β URL of the OpenPGP keytimestamp(x) β timestamp when the key was created
Informational signal emitted after a repository key was successfully imported. she's in, she's official, she's got the crown π
π org.rpm.dnf.v0.rpm.Repo interface
interface org.rpm.dnf.v0.rpm.Repo
method list
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. the vibe check of repo lists π¦
Following options are supported:
patterns: list of strings- any repository with id matching to any of
patternsis returned
- any repository with id matching to any of
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. -
- When set to
(and yes bestie, that list keeps going β hang tight β¨)
interactive: boolean, defaultfalseβ set this to"true"when a user is doing the operation, so user interaction like password prompts can happen. π
Unknown options are ignored, no cap. π
confirm_key_with_options(s key_id, b confirmed, a{sv} options) -> ()
Arguments
key_id(s) β the id of the key in question πconfirmed(b) β whether the key import is confirmed by the user βoptions(a{sv}) β an array of key/value pairs to modify the call behavior βοΈ
Confirm the repository OpenPGP key import, bestie! π
Following @options are supported:
interactive: boolean, defaulttrueβ set this to"true"when a user is doing the operation, so user interaction like password prompts can happen. π
Unknown options are ignored. π
confirm_key(s key_id, b confirmed) -> ()
Arguments
key_id(s) β the id of the key in question πconfirmed(b) β whether the key import is confirmed by the user β
Confirm the repository OpenPGP key import. π
This is equivalent to call "confirm_key_with_options()" with empty options. β¨
enable_with_options(as repo_ids, a{sv} options) -> ()
Arguments
repo_ids(as) β array of strings containing all repo ids to be enabled πoptions(a{sv}) β an array of key/value pairs to modify the call behavior βοΈ
Enable repositories based on the list of given ids, slay! π
Following @options are supported:
interactive: boolean, defaulttrueβ set this to"true"when a user is doing the operation, so user interaction like password prompts can happen. π
Unknown options are ignored. π
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. π
This is equivalent to call "enable_with_options()" with empty options. β¨
disable_with_options(as repo_ids, a{sv} options) -> ()
Arguments
repo_ids(as) β array of strings containing all repo ids to be disabled π«options(a{sv}) β an array of key/value pairs to modify the call behavior βοΈ
Disable repositories based on the list of given ids, periodt. π΄
Following @options are supported:
interactive: boolean, defaulttrueβ set this to"true"when a user is doing the operation, so user interaction like password prompts can happen. π
Unknown options are ignored. π
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. π΄
This is equivalent to call "disable_with_options()" with empty options. β¨
π org.rpm.dnf.v0.rpm.Rpm interface π
interface org.rpm.dnf.v0.rpm.Rpm π
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 a list of packages that match the filters you set. π― Okay so, this method sends packages straight in the D-Bus reply, which has a limited size. So if you ask for a huge number of packages and/or a ton of package attributes, maybe use the list_fd() method instead. π«£
Following options and filters are supported:
package_attrs: list of strings β the list of package attributes that get returned. Supported attributes arename,epoch,version,release,arch,repo_id,from_repo_id,is_installed,install_size,download_size,buildtime,install_time,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 (defaulttrue) β match patterns against the NEVRAs of available packages π·οΈwith_provides: bool (defaulttrue) β match patterns against the provides of available packages π§©with_filenames: bool (defaulttrue) β match patterns against the names of files in available packages πwith_binaries: bool (defaulttrue) β match patterns against the names of binaries in/usr/(s)binin available packages πwith_src: bool (defaulttrue) β include source rpms in the results π¦icase: bool (defaulttrue) β ignore case while matching patterns πinteractive: boolean, defaultfalseβ set this to"true"when a user is doing the operation, so user interaction like password prompts can happen. πpatterns: list of strings β any package that matches any of the patterns gets returned π―scope: string (default"all") β limit packages to one of"all","installed","available","upgrades","upgradable"πarch: list of strings β limit the resulting set to only packages with the given architectures ποΈrepo: list of strings β limit the resulting set to only packages from the given repositories πlatest-limit: int β limit the resulting set to only<limit>latest packages for every name and architecture π’whatprovides: list of strings β limit the resulting set to only packages that provide any of the given capabilities π§©whatdepends: list of strings β limit the resulting set to only packages that require, enhance, recommend, suggest or supplement any of the given capabilities πwhatrequires: list of strings β limit the resulting set to only packages that require any of the given capabilities πwhatrecommends: list of strings β limit the resulting set to only packages that recommend any of the given capabilities πwhatenhances: list of strings β limit the resulting set to only packages that enhance any of the given capabilities β¨whatsuggests: list of strings β limit the resulting set to only packages that suggest any of the given capabilities π‘whatsupplements: list of strings β limit the resulting set to only packages that supplement any of the given capabilities βwhatobsoletes: list of strings β limit the resulting set to only packages that obsolete any of the given capabilities ποΈwhatconflicts: list of strings β limit the resulting set to only packages that conflict with any of the given capabilities βοΈ
Unknown options are ignored. π
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. π
Okay so you get back a list of packages that match whatever filters you threw at it π
. Every package comes through as a JSON object β one object per package, and each one is basically a dictionary. That whole stream gets written straight into the file_descriptor you gave it π«Ά.
And here's the iconic bit: unlike the list() method, this one does not have issues with big output data π. No cap, it just handles it. Also the server has a 30-second timeout β that's how long 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. Periodt β¨.
method install(as pkg_specs, a{sv} options) -> ()
Arguments
pkg_specs(as) β an array of package specifications to be installed on the systemoptions(a{sv}) β an array of key/value pairs to modify install behavior
Marks the packages named in @pkg_specs for installation β¨.
The following @options are supported:
repo_ids: list of strings β the identifiers of the repos the packages could be installed from.skip_broken: boolean, defaultfalseβ whether the solver can skip packages with broken dependencies to resolve the transactionskip_unavailable: boolean, defaultfalseβ whether nonexisting packages can be skipped.
Anything else you pass in? Ignored, bestie π.
method upgrade(as pkg_specs, a{sv} options) -> ()
Arguments
pkg_specs(as) β an array of package specifications to be upgraded on the systemoptions(a{sv}) β an array of key/value pairs to modify upgrade behavior
Marks the packages named in @pkg_specs for upgrade π.
The following @options are supported:
repo_ids: list of strings β the identifiers of the repos the packages could be upgraded from.
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 systemoptions(a{sv}) β an array of key/value pairs to modify remove behavior
Marks the packages named in @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 versionsoptions(a{sv}) β an array of key/value pairs to modify distro_sync behavior
The 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 systemoptions(a{sv}) β an array of key/value pairs to modify downgrade behavior
Marks the packages named in @pkg_specs for downgrade π¦.
The 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 systemoptions(a{sv}) β an array of key/value pairs to modify reinstall behavior
Marks the packages named in @pkg_specs for reinstall π.
The following @options are supported:
Unknown options are ignored.
method system_upgrade(a{sv} options) -> ()
Arguments
options(a{sv}) β an array of key/value pairs to modify system_upgrade behavior
This one gets a transaction ready for upgrading to the new distribution release π. That prepared transaction should be executed during reboot β peep the offline option of the do_transaction method of the Goal interface. And heads up: the method relies on the releasever option being correctly set to the new distribution release during the open_session() call β οΈ.
The following @options are supported:
mode: string (one of"distrosync","upgrade", default is"distrosync") β By defaultsystem_upgradebehaves likednf distro-sync, always installing packages from the new release, even if they are older than the currently installed version. If set to"upgrade", packages from the new release are not installed if they are older than what is currently installed (so it behaves likednf upgrade).interactive: boolean, defaulttrueβ Set to"true"when the operation is done by a user, so user interaction like password prompts can happen.
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 sessionnevra(s) β full NEVRA of the packageprocessed(t) β amount already processedtotal(t) β total to process
Overall progress in transaction item processing. Fires right before an item gets processed β¨.
signal transaction_before_begin(o session_object_path, t total)
Arguments
session_object_path(o) β object path of the dnf5daemon sessiontotal(t) β number of elements in the rpm transaction
Sent 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 sessionsuccess(b) βtrueif the rpm transaction was completed successfully
Sent 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 sessionnevra(s) β full NEVRA of the packageaction(u) β one of thednfdaemon::RpmTransactionItem::Actionsenumtotal(t) β the disk space used/freed by the package after the action finishes
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 sessionnevra(s) β full NEVRA of the packageprocessed(t) β the portion of the package already installed/removedtotal(t) β the disk space used/freed by the package after the action finishes
Progress in processing of the package π. And bestie, listen β there's a hardcoded limit that stops it from sending more than one signal every 400 milliseconds, so it doesn't overwhelm the user or D-Bus with excessive signals. For smaller packages there might be no progress signals at all, or only the starting progress signal with @processed equal to 0 π«Ά.
signal transaction_action_stop(o session_object_path, s nevra, t total)
Arguments
session_object_path(o) β object path of the dnf5daemon sessionnevra(s) β full NEVRA of the packagetotal(t) β the disk space used/freed by the package after the action finishes
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 sessionnevra(s) β full NEVRA of the package script belongs toscriptlet_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 sessionnevra(s) β full NEVRA of the package script belongs toscriptlet_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 sessionnevra(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) βtrueif 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.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_typeis one oflibdnf5::transaction::TransactionItemType,actionis one oflibdnf5::transaction::TransactionItemAction,reasonis one oflibdnf5::transaction::TransactionItemReasonenums. Each of these enums are represented as strings using correspondinglibdnf5::transaction::*_to_string()methods.transaction_item_attributesis a map{attribute: value}. Currently"reason_change_group_id"attribute is used for target group id in case the action isReasonChangeand the reasonGroup, and"replaces"containing a vector of packages ids being replaced by this item. Finally theobjectis a map{attribute: value}and represents (according toobject_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 are0- no problem,1- no problem, but some info / warnings are present or2- resolving failed. π
Resolve the transaction. β¨
Following @options are supported:
allow_erasing: boolean, defaultfalseβ Whether removal of installed package is allowed to resolve the transaction. ποΈinteractive: boolean, defaultfalseβ Set to"true", when the operation is done by a user, thus user interaction like password prompts can be done. πββοΈ
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β seeinclude/libdnf5/base/goal_elements.hpp:GoalActionproblemβ seeinclude/libdnf5/base/goal_elements.hpp:GoalProblem
- optional:
goal_job_settingsβ{string: variant}, settings used to resolve the goal spec - string, usually nevra of affected packageadditional_dataβ array of strings, more details on the problemsolver_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. π¬offline: boolean, defaultfalseβ Iftrue, the transaction will be prepared to run during the next reboot. Otherwise, it will run immediately. πinteractive: boolean, defaulttrueβ Set to"true", when the operation is done by a user, thus user interaction like password prompts can be done. πββοΈdownloadonly: boolean, defaultfalse, since5.2.16β Iftrue, only download the resolved package set without executing an RMP transaction. Along with theofflineoption, the offline transaction files are prepared, but the execution of the transaction is not initiated. π₯
Unknown options are ignored. π
method cancel() -> (b success, s error_msg)
Returns
success(b) βtrueif the cancellation was successfully requested βerror_msg(s) β error message if the cancellation was refused π
Cancel the transaction that was initiated by do_transaction(). The transaction can only be canceled during the package download phase. Once the RPM transaction has begun, cancellation is no longer permitted. β
method reset() -> ()
Reset the prepared rpm transaction. After this call the session is ready to perform another rpm transaction. π
π org.rpm.dnf.v0.Offline interface
interface org.rpm.dnf.v0.Offline
method get_status() -> (b pending, a{sv} transaction_status)
Returns
pending(b) β boolean,trueif there is a pending offline transaction β³transaction_status(a{sv}) β the status of the current offline dnf5 transaction π
Check whether there is an offline transaction configured for the next reboot initiated by dnf5 and return its status. π
method cancel_with_options(a{sv} options) -> (b success, s error_msg)
Arguments
options(a{sv}) β an array of key/value pairs to modify the call behavior π οΈ
Returns
- success (
b) β boolean, comes backfalseif something went wrong during the transaction cancellation, or if the offline transaction was started by some other tool that isn't dnf5. Comes backtrueif the offline transaction got successfully cancelled, or if literally no offline transaction was even configured in the first place. π - error_msg (
s) β string, holds the error we hit while cancelling the transaction
Cancels the dnf5 offline transaction that's been configured for the next reboot. Offline updates scheduled by another tool are not cancelled. Sorry bestie, not our jurisdiction. π«
Following @options are supported:
interactiveβ boolean, defaulttrue. Set it to"true"when the operation is being done by a user, so user interaction like password prompts can happen. π«Ά
Unknown options are ignored. They just get politely ghosted. π»
method cancel() -> (b success, s error_msg)
Returns
- success (
b) β boolean, returnsfalseif there was an error during the transaction cancellation, or if the offline transaction was initiated by another tool than dnf5. Returnstrueif the offline transaction was successfully cancelled or if no offline transaction was configured. - error_msg (
s) β string, contains error encountered while cancelling the transaction
Cancel the dnf5 offline transaction configured for the next reboot. Offline updates scheduled by another tool are not cancelled.
This is literally the same energy as calling cancel_with_options() with empty options. β¨
method clean_with_options() -> (b success, s error_msg)
Returns
- success (
b) β boolean, returnsfalseif there was an error during the transaction cleanup. Returnstrueif the offline transaction was successfully cleaned or if no offline transaction was configured. - error_msg (
s) β string, contains error encountered while cleaning the transaction
Cancel the dnf5 offline transaction configured for the next reboot and remove all the stored offline transaction data, including the downloaded packages. Offline updates scheduled by another tool are not affected β we only clean up our own mess. π§Ή
Following @options are supported:
interactiveβ boolean, defaulttrue. Set it to"true"when the operation is being done by a user, so user interaction like password prompts can happen. π«Ά
Unknown options are ignored.
method clean(a{sv} options) -> (b success, s error_msg)
Arguments
- options (
a{sv})
Returns
- success (
b) β boolean, returnsfalseif there was an error during the transaction cleanup. Returnstrueif the offline transaction was successfully cleaned or if no offline transaction was configured. - error_msg (
s) β string, contains error encountered while cleaning the transaction
Cancel the dnf5 offline transaction configured for the next reboot and remove all stored offline transaction data, including downloaded packages. Offline updates scheduled by another tool are not affected.
This is equivalent to call clean_with_options() with empty options. Same thing, shorter name. π
method set_finish_action_with_options(s action, a{sv} options) -> (b success, s error_msg)
Arguments
- action (
s) β string, one of"poweroff", or"reboot". If set to"poweroff", the system will be powered off after applying the offline transaction. Otherwise the system will reboot. - options (
a{sv}) β an array of key/value pairs to modify the call behavior
Returns
- success (
b) β boolean,trueif the action was successfully set - error_msg (
s) β string, contains error encountered while setting the action
Set the action that should be performed after the offline transaction is applied. If the action is "poweroff", the system will be powered off, otherwise it will be rebooted (which is default). The call might fail in case there is no scheduled offline transaction, or the transaction was not scheduled using libdnf5. π
Following @options are supported:
interactiveβ boolean, defaulttrue. Set it to"true"when the operation is being done by a user, so user interaction like password prompts can happen. π«Ά
Unknown options are ignored.
method set_finish_action(s action) -> (b success, s error_msg)
Arguments
- action (
s) β string, one of"poweroff", or"reboot". If set to"poweroff", the system will be powered off after applying the offline transaction. Otherwise the system will reboot.
Returns
- success (
b) β boolean,trueif the action was successfully set - error_msg (
s) β string, contains error encountered while setting the action
Set the action that should be performed after the offline transaction is applied. If the action is "poweroff", the system will be powered off, otherwise it will be rebooted (which is default). The call might fail in case there is no scheduled offline transaction, or the transaction was not scheduled using libdnf5.
This is equivalent to call set_finish_action_with_options() with empty options. β¨
method schedule_for_next_boot(a{sv} options) -> (b success, s error_msg)
Arguments
- options (
a{sv}) β an array of key/value pairs to modify the call behavior
Returns
- success (
b) β boolean,trueif the offline transaction was successfully scheduled for the next boot - error_msg (
s) β string, contains error encountered while scheduling the transaction
Schedule the prepared offline transaction for the next boot. This creates the magic symlink /system-update and sets the transaction status to "ready". The system will not be rebooted; the caller is responsible for initiating the reboot when appropriate. Main character energy: you do the reboot, we just set the stage. π
The call might fail if there is no offline transaction in the "download-complete" or "ready" state, or the transaction was not prepared using libdnf5. π
Following @options are supported:
interactiveβ boolean, defaulttrue. Set it to"true"when the operation is being done by a user, so user interaction like password prompts can happen. π«Ά
Unknown options are ignored.
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. Vibe check, but for package groups. πΈ
Following options and filters are supported:
attributesβ list of strings. List of group attributes that are returned.match_group_idβ bool (defaulttrue). Match patterns against ids of the groups.match_group_nameβ bool (defaultfalse). Match patterns against names of the groups.scopeβ string (default"all"). Limit groups to one of"all","installed","available".with_hiddenβ bool (defaultfalse). 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.langβ string (default current locale). Language code fortranslated_nameandtranslated_descriptionattributes.interactiveβ boolean, defaultfalse. Set to"true"when the operation is done by a user, thus user interaction like password prompts can be done.
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}) β the array of advisories that came back, each one loaded up with whichever attributes you asked for β¨
Get the list of security advisories that match the filters you gave it. Like, you hand it a vibe and it hands you advisories, bestie π
Here's everything it supports:
advisory_attrs(list of strings) β the list of advisory attributes that get returned inside theadvisoriesarray. The supported ones are"advisoryid","name","title","type","severity","status","vendor","description","buildtime","message","rights","collections", and"references".availability(string, default"available") β limits which advisories come back based on how they relate to your installed packages. The accepted values are:"available"β only advisories that have newer versions of packages you already have installed"all"β literally all the advisories, no filter, main character energy"installed"β only advisories with equal or older versions of installed packages"updates"β only advisories with newer versions of installed packages where an update is actually available
names(list of strings) β only consider advisories with one of the given advisory identifiers. The values have to be exact advisory IDs, like"FEDORA-2025-beb4c9a336"or"RHSA-2024:1234". Globs/wildcards and package names? Not accepted here, sorry π«Άtypes(list of strings) β only consider advisories of the given types. The possible types are"security","bugfix","enhancement", and"newpackage".contains_pkgs(list of strings) β only consider advisories that contain packages whose names match one of the given glob patterns. The matching happens against package base names (like"kernel","bash","buildah"). NEVRA strings andname.archforms are not supported.severities(list of strings) β only consider advisories with the given severity. Possible values are"critical","important","moderate","low", and"none".reference_bzs(list of strings) β only consider advisories that reference the given Bugzilla ticket ID. The expected values are numeric IDs, e.g.123456.reference_cves(list of strings) β only consider advisories that reference the given CVE ID. Expected values are string IDs in CVE format, e.g.CVE-2201-0123.with_bz(boolean, defaultFalse) β only consider advisories that reference a Bugzilla ticket.with_cve(boolean, defaultFalse) β only consider advisories that reference a CVE ticket.interactive(boolean, defaultfalse) β set this to"true"when the operation is being done by a user, so that user interaction like password prompts can happen π
Unknown options are just ignored. Noted and moved on π
π org.rpm.dnf.v0.History interface
interface org.rpm.dnf.v0.History
π¦ method recent_changes(a{sv} options) -> (a{saa{sv}} changeset)
Arguments
options(a{sv}) β an array of key/value pairs
Returns
changeset(a{saa{sv}}) β a dictionary shaped like{"<type_of_change>":[<package>,<package>,...]}
Get a list of packages that have been recently changed. Basically it's the glow-up diff between the package set you have installed right now and the set as it was at some point in time β¨
The "type_of_change" key in that output dictionary can be one of: "installed", "removed", "upgraded", or "downgraded". The packages in the output are dictionaries holding whatever set of attributes you requested for the changed packages.
For installed, upgraded, and downgraded packages, you get the currently installed version back.
For upgraded and downgraded packages, the "original_evr" and "original_arch" attributes also come along, holding the package EVR and architecture from before the change. Receipts, bestie π§Ύ
If you ask for it, upgraded packages may also include an "advisories" list field, naming the updates that contain the upgraded (a.k.a. currently installed) version of the package. And if the "all_advisories" option is set, you also get advisories for every version between the original and the currently installed one. The way it just gives you the whole timeline π
For removed packages, only the name, arch, and evr of the removed version are provided. That's it. Gone. π
Every package in the output includes a "transaction_time" attribute (uint64, unix timestamp) saying when the transaction that caused the change was completed.
Here's what it supports:
upgraded_packages(boolean, default"true") β whether to include upgraded packages in the output.downgraded_packages(boolean, default"true") β whether to include downgraded packages in the output.installed_packages(boolean, default"true") β whether to include installed packages in the output.removed_packages(boolean, default"true") β whether to include removed packages in the output.include_advisory(boolean, default"true") β whether to add"advisories"to the attributes of upgraded packages.all_advisories(boolean, default"false") β only makes sense together withinclude_advisory=true. It also includes advisories for all versions between the original and the currently installed one.package_attrs(list of strings, default["name", "summary", "evr", "arch"]) β the list of package attributes returned for each changed package. The supported attributes are the same ones as in thelist()method of the Rpm interface.since(int64, unix timestamp) β get changes since a given point in time.interactive(boolean, defaultfalse) β set to"true"when the operation is done by a user, so user interaction like password prompts can happen.
Unknown options are ignored. As always π
πΈ method list(a{sv} options) -> (aa{sv} transactions)
Arguments
options(a{sv}) β an array of key/value pairs
Returns
transactions(aa{sv}) β array of transactions with their packages
Get a list of transactions straight out of the history database π Each transaction includes its metadata plus categorized package changes.
The packages in each category are dictionaries holding whatever set of attributes you asked for. For upgraded and downgraded packages, an "original_evr" attribute comes along with the original package EVR. Iconic.
Options supported:
limit(int64) β maximum number of transactions to return.since(int64, unix timestamp) β only return transactions completed after this time.reverse(boolean, default"false") β if true, return the oldest transactions first. Default is newest first.contains_pkgs(list of strings) β filter down to transactions containing packages with these names.transaction_attrs(list of strings, default["id", "start", "end", "user_id", "description", "status"]) β the list of transaction attributes to include. Supported:id,start,end,user_id,description,status,releasever,comment.package_attrs(list of strings, default["name", "arch", "evr"]) β the list of package attributes to include. Supported:name,epoch,version,release,arch,evr,repo_id,action,reason.include_packagesβ this one's a boolean, and it defaults to"true"(yes bestie, it's a string in quotes, that's just how the schema said it). It's the vibe check on whether the package lists come along for the ride: installed, removed, upgraded, downgraded. Set it false and those lists justβ¦ don't show up. π
And if you send an option that nobody recognizes? Unknown options are ignored. No error, no side-eye, no "bestie what is that" β they're just quietly not a thing. π
π AUTHOR π
Wanna know who actually built all this? Look at AUTHORS.md in the dnf5 source distribution. The whole squad's in there. π«Ά
π COPYRIGHT π
Contributors to the dnf5 project. That's it, that's the whole copyright line β a whole community of icons holding it down. π
And that's a wrap on the whole page, bestie!! π This was DNF5DAEMON-DBUS-API(8) β yes, section 8, the big-kid sysadmin section β stamped with the date Sep 24, 2026. You read the entire thing, which means you're officially built different. Go forth and talk to the daemon over D-Bus, you absolute legend. β¨π¦π
π¦ where this page comes from
- fedora 44: dnf5daemon-server 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms