DNF5 Workflow

Typical DNF5 workflow consists of:

  1. set up loggers

  2. create base

  3. add dnf5 commands

  4. load dnf5 plugins: (See DNF5 Plugins for details.)
    1. dnf5 plugin init hook

    2. dnf5 plugin create_commands hook

    3. run command specific set_parent_command step

    4. run command specific set_argument_parser step

    5. run command specific register_subcommands step
      (for native dnf5 commands the last 3 steps are done as a part of ‘add dnf5 commands’)
  5. load aliases

  6. parse command line arguments

  7. run command specific pre_configure step

  8. load main configuration

  9. enable/disable libdnf5 plugins

  10. base setup:
    1. load libdnf5 plugins (See LIBDNF5 Plugins for details.)

    2. libdnf5 plugin init hook

    3. libdnf5 plugin pre_base_setup hook

    4. lock installroot

    5. load Vars and lock varsdir

    6. libdnf5 plugin post_base_setup hook

  11. create repo sack

  12. create repos from system configuration
    • perform Vars substitution on repository id and all values (See Repo Variables for details.)

  13. create repos from paths (such as –repofrompath arg)
    • perform Vars substitution on specified id and path

  14. apply repository setopts (such as –setopt=fedora.metadata_expire=0)

  15. run command specific configure step

  16. libdnf5 plugin repos_configured hook

  17. if command requires privileges check for them

  18. load repositories:
    1. if required load system repository

    2. if required load enabled repositories:
      1. load metadata from cache if valid

      2. try to reuse root’s cache

      3. metadata download

      4. metadata gpg check

      5. if required import repository gpg keys and try again

  19. libdnf5 plugin repos_loaded hook

  20. run command specific load_additional_packages step

  21. run command specific run step

  22. if the command produced a goal:
    1. libdnf5 plugin pre_add_cmdline_packages hook

    2. add commandline packages

    3. libdnf5 plugin post_add_cmdline_packages hook

    4. resolve goal (resolve dependencies)

    5. run command specific goal_resolved step

    6. print transaction table

    7. check for user approval

    8. download inbound transaction packages

    9. check gpg signatures for inbound transaction packages

    10. lock transaction libdnf5::utils::Locker

    11. create rpm transaction

    12. run rpm test transaction

    13. libdnf5 plugin pre_transaction hook

    14. start database transaction

    15. run rpm transaction

    16. update system_state (See dnf5-system-state(7), System state for details.)

    17. finish database transaction

    18. libdnf5 plugin post_transaction hook

    19. unlock transaction libdnf5::utils::Locker

  23. libdnf5 plugin finish hook

  24. dnf5 plugin finish hook