DNF5 Workflow
Typical DNF5 workflow consists of:
set up loggers
create base
add dnf5 commands
- load dnf5 plugins: (See DNF5 Plugins for details.)
dnf5 plugin
inithookdnf5 plugin
create_commandshookrun command specific
set_parent_commandsteprun command specific
set_argument_parserstep- run command specific
register_subcommandsstep(for native dnf5 commands the last 3 steps are done as a part of ‘add dnf5 commands’)
load aliases
parse command line arguments
run command specific
pre_configurestepload main configuration
enable/disable libdnf5 plugins
- base setup:
load libdnf5 plugins (See LIBDNF5 Plugins for details.)
libdnf5 plugin
inithooklibdnf5 plugin
pre_base_setuphooklock installroot
load Vars and lock varsdir
libdnf5 plugin
post_base_setuphook
create repo sack
- create repos from system configuration
perform Vars substitution on repository id and all values (See Repo Variables for details.)
- create repos from paths (such as –repofrompath arg)
perform Vars substitution on specified id and path
apply repository setopts (such as –setopt=fedora.metadata_expire=0)
run command specific
configuresteplibdnf5 plugin
repos_configuredhookif command requires privileges check for them
- load repositories:
if required load system repository
- if required load enabled repositories:
load metadata from cache if valid
try to reuse root’s cache
metadata download
metadata OpenPGP check
if required import repository OpenPGP keys and try again
libdnf5 plugin
repos_loadedhookrun command specific
load_additional_packagessteprun command specific
runstep- if the command produced a goal:
libdnf5 plugin
pre_add_cmdline_packageshookadd commandline packages
libdnf5 plugin
post_add_cmdline_packageshookresolve goal (resolve dependencies)
libdnf5 plugin
goal_resolvedhookrun command specific
goal_resolvedstepprint transaction table
check for user approval
download inbound transaction packages
check OpenPGP signatures for inbound transaction packages
lock transaction
libdnf5::utils::Lockercreate rpm transaction
run rpm test transaction
libdnf5 plugin
pre_transactionhookstart database transaction
run rpm transaction
update system_state (See dnf5-system-state(7), System state for details.)
finish database transaction
libdnf5 plugin
post_transactionhookunlock transaction
libdnf5::utils::Locker
libdnf5 plugin
finishhookdnf5 plugin
finishhook