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, 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. (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) β€” true if repositories were successfully loaded, false otherwise.

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) β€” true if the cache was successfully cleaned, false otherwise.
  • 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, default true
    • Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done.

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) β€” true if the cache was successfully cleaned, false otherwise.
  • 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) β€” true if the session was successfully reset, false otherwise.
  • 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 the dnf5daemon session
  • download_id (s) β€” unique id of downloaded object (repo or package)
  • description (s) β€” the description of the downloaded object
  • total_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 the dnf5daemon session
  • download_id (s) β€” unique id of downloaded object (repo or package)
  • total_to_download (x) β€” total bytes to download
  • downloaded (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 the dnf5daemon session
  • download_id (s) β€” unique id of downloaded object (repo or package)
  • message (s) β€” an error message
  • url (s) β€” URL being downloaded
  • metadata (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 the dnf5daemon session
  • download_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 the dnf5daemon session
  • key_id (s) β€” OpenPGP key id
  • user_ids (as) β€” User id
  • key_fingerprint (s) β€” Fingerprint of the OpenPGP key
  • key_url (s) β€” URL of the OpenPGP key
  • timestamp (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 the dnf5daemon session
  • key_id (s) β€” OpenPGP key id
  • user_ids (as) β€” User id
  • key_fingerprint (s) β€” Fingerprint of the OpenPGP key
  • key_url (s) β€” URL of the OpenPGP key
  • timestamp (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 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. -

(and yes bestie, that list keeps going β€” hang tight ✨)

  • interactive: boolean, default false β€” 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, default true β€” 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, default true β€” 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, default true β€” 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 are name, 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 (default true) β€” match patterns against the NEVRAs of available packages 🏷️
  • with_provides: bool (default true) β€” match patterns against the provides of available packages 🧩
  • with_filenames: bool (default true) β€” match patterns against the names of files in available packages πŸ“
  • with_binaries: bool (default true) β€” match patterns against the names of binaries in /usr/(s)bin in available packages πŸƒ
  • with_src: bool (default true) β€” include source rpms in the results πŸ“¦
  • icase: bool (default true) β€” ignore case while matching patterns πŸ” 
  • interactive: boolean, default false β€” 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 system
  • options (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, default false β€” whether the solver can skip packages with broken dependencies to resolve the transaction
  • skip_unavailable: boolean, default false β€” 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 system
  • options (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 system
  • options (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 versions
  • options (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 system
  • options (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 system
  • options (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 default system_upgrade behaves like dnf 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 like dnf upgrade).
  • interactive: boolean, default true β€” 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 session
  • nevra (s) β€” full NEVRA of the package
  • processed (t) β€” amount already processed
  • total (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 session
  • total (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 session
  • success (b) β€” true if 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 session
  • nevra (s) β€” full NEVRA of the package
  • action (u) β€” one of the dnfdaemon::RpmTransactionItem::Actions enum
  • total (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 session
  • nevra (s) β€” full NEVRA of the package
  • processed (t) β€” the portion of the package already installed/removed
  • total (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 session
  • nevra (s) β€” full NEVRA of the package
  • total (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 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.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. πŸ—‘οΈ
  • interactive: boolean, default false β€” 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 β€” 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. πŸ’¬
  • offline: boolean, default false β€” If true, the transaction will be prepared to run during the next reboot. Otherwise, it will run immediately. πŸ”„
  • interactive: boolean, default true β€” Set to "true", when the operation is done by a user, thus user interaction like password prompts can be done. πŸ™‹β€β™€οΈ
  • downloadonly: boolean, default false, since 5.2.16 β€” If true, only download the resolved package set without executing an RMP transaction. Along with the offline option, 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) β€” true if 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, true if 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 back false if something went wrong during the transaction cancellation, or if the offline transaction was started by some other tool that isn't dnf5. Comes back true if 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, default true. 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, returns false if there was an error during the transaction cancellation, or if the offline transaction was initiated by another tool than dnf5. Returns true if 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, returns false if there was an error during the transaction cleanup. Returns true if 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, default true. 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, returns false if there was an error during the transaction cleanup. Returns true if 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, true if 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, default true. 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, true if 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, true if 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, default true. 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 (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.
  • lang β€” string (default current locale). Language code for translated_name and translated_description attributes.
  • interactive β€” boolean, default false. 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 the advisories array. 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 and name.arch forms 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, default False) β€” only consider advisories that reference a Bugzilla ticket.
  • with_cve (boolean, default False) β€” only consider advisories that reference a CVE ticket.
  • interactive (boolean, default false) β€” 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 with include_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 the list() method of the Rpm interface.
  • since (int64, unix timestamp) β€” get changes since a given point in time.
  • interactive (boolean, default false) β€” 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. 🫢


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