diff --git a/doc/api/c++/cpp.rst b/doc/api/c++/cpp.rst index 2dc530343..88c5fec9f 100644 --- a/doc/api/c++/cpp.rst +++ b/doc/api/c++/cpp.rst @@ -6,5 +6,6 @@ C++ .. toctree:: libdnf5 libdnf5_advisory + libdnf5_cli libdnf5_repo libdnf5_rpm diff --git a/doc/api/c++/libdnf5.rst b/doc/api/c++/libdnf5.rst index c614465ad..f6756b30e 100644 --- a/doc/api/c++/libdnf5.rst +++ b/doc/api/c++/libdnf5.rst @@ -4,9 +4,10 @@ libdnf5 .. toctree:: libdnf5_base - libdnf5_goal - libdnf5_goal_elements - libdnf5_query_cmp libdnf5_base_log_event libdnf5_base_transaction libdnf5_base_transaction_package + libdnf5_goal + libdnf5_goal_elements + libdnf5_query_cmp + libdnf5_vars diff --git a/doc/api/c++/libdnf5_cli.rst b/doc/api/c++/libdnf5_cli.rst new file mode 100644 index 000000000..eea0d1d65 --- /dev/null +++ b/doc/api/c++/libdnf5_cli.rst @@ -0,0 +1,6 @@ +libdnf5::cli +============ + + +.. toctree:: + libdnf5_cli_argument_parser diff --git a/doc/api/c++/libdnf5_cli_argument_parser.rst b/doc/api/c++/libdnf5_cli_argument_parser.rst new file mode 100644 index 000000000..7c82999c2 --- /dev/null +++ b/doc/api/c++/libdnf5_cli_argument_parser.rst @@ -0,0 +1,7 @@ +ArgumentParser +============== + +.. _api_libdnf5_cli_argument_parser-label: + +.. doxygenclass:: libdnf5::cli::ArgumentParser + :members: diff --git a/doc/api/c++/libdnf5_repo.rst b/doc/api/c++/libdnf5_repo.rst index 1257c75f7..71b5432ed 100644 --- a/doc/api/c++/libdnf5_repo.rst +++ b/doc/api/c++/libdnf5_repo.rst @@ -5,3 +5,4 @@ libdnf5::repo .. toctree:: libdnf5_repo_config_repo libdnf5_repo_repo_query + libdnf5_repo_repo_sack diff --git a/doc/api/c++/libdnf5_repo_repo_sack.rst b/doc/api/c++/libdnf5_repo_repo_sack.rst new file mode 100644 index 000000000..7739b80ad --- /dev/null +++ b/doc/api/c++/libdnf5_repo_repo_sack.rst @@ -0,0 +1,6 @@ +RepoSack +======== + + +.. doxygenclass:: libdnf5::repo::RepoSack + :members: diff --git a/doc/api/c++/libdnf5_vars.rst b/doc/api/c++/libdnf5_vars.rst new file mode 100644 index 000000000..3b25126f9 --- /dev/null +++ b/doc/api/c++/libdnf5_vars.rst @@ -0,0 +1,6 @@ +Vars +==== + + +.. doxygenclass:: libdnf5::Vars + :members: diff --git a/doc/api/python/libdnf5_conf.rst b/doc/api/python/libdnf5_conf.rst new file mode 100644 index 000000000..cb0a80ce3 --- /dev/null +++ b/doc/api/python/libdnf5_conf.rst @@ -0,0 +1,6 @@ +libdnf5.conf +============ + + +.. toctree:: + libdnf5_conf_vars diff --git a/doc/api/python/libdnf5_conf_vars.rst b/doc/api/python/libdnf5_conf_vars.rst new file mode 100644 index 000000000..6fc5725ef --- /dev/null +++ b/doc/api/python/libdnf5_conf_vars.rst @@ -0,0 +1,6 @@ +Vars +==== + + +.. autoclass:: libdnf5.conf.Vars + :members: diff --git a/doc/api/python/libdnf5_repo.rst b/doc/api/python/libdnf5_repo.rst index e3f5b85c0..4c8458049 100644 --- a/doc/api/python/libdnf5_repo.rst +++ b/doc/api/python/libdnf5_repo.rst @@ -3,4 +3,6 @@ libdnf5.repo .. toctree:: + libdnf5_repo_config_repo libdnf5_repo_repo_query + libdnf5_repo_repo_sack diff --git a/doc/api/python/libdnf5_repo_config_repo.rst b/doc/api/python/libdnf5_repo_config_repo.rst new file mode 100644 index 000000000..535b103b0 --- /dev/null +++ b/doc/api/python/libdnf5_repo_config_repo.rst @@ -0,0 +1,6 @@ +ConfigRepo +========== + + +.. autoclass:: libdnf5.repo.ConfigRepo + :members: diff --git a/doc/api/python/libdnf5_repo_repo_sack.rst b/doc/api/python/libdnf5_repo_repo_sack.rst new file mode 100644 index 000000000..aa9d190b6 --- /dev/null +++ b/doc/api/python/libdnf5_repo_repo_sack.rst @@ -0,0 +1,6 @@ +RepoSack +======== + + +.. autoclass:: libdnf5.repo.RepoSack + :members: diff --git a/doc/api/python/python.rst b/doc/api/python/python.rst index f092ea4b2..cd8b18072 100644 --- a/doc/api/python/python.rst +++ b/doc/api/python/python.rst @@ -6,5 +6,6 @@ Python .. toctree:: libdnf5_advisory libdnf5_base + libdnf5_conf libdnf5_repo libdnf5_rpm diff --git a/doc/dnf5.conf.5.rst b/doc/dnf5.conf.5.rst index fdd5c9e07..bb89979e3 100644 --- a/doc/dnf5.conf.5.rst +++ b/doc/dnf5.conf.5.rst @@ -607,6 +607,7 @@ For a given repository with an identifier in the form "-rpms", its correspon For example, for repository "fedora", the source repository is "fedora-source" and debuginfo repository is "fedora-debuginfo". For repository "fedora-rpms", the source repository is "fedora-source-rpms" and debuginfo repository is "fedora-debug-rpms". +.. _repo_variables-label: Repo Variables ============== diff --git a/doc/dnf5_workflow.rst b/doc/dnf5_workflow.rst new file mode 100644 index 000000000..59b70473b --- /dev/null +++ b/doc/dnf5_workflow.rst @@ -0,0 +1,71 @@ +############# +DNF5 Workflow +############# + + +Typical DNF5 workflow consists of: + +#. set up loggers +#. create base +#. add dnf5 commands +#. load dnf5 plugins: (See :ref:`DNF5 Plugins ` for details.) + #. dnf5 plugin ``init`` hook + #. dnf5 plugin ``create_commands`` hook + #. run command specific ``set_parent_command`` step + #. run command specific ``set_argument_parser`` step + #. | run command specific ``register_subcommands`` step + | (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_configure`` step +#. load main configuration +#. enable/disable libdnf5 plugins +#. base setup: + #. load libdnf5 plugins (See :ref:`LIBDNF5 Plugins ` for details.) + #. libdnf5 plugin ``init`` hook + #. libdnf5 plugin ``pre_base_setup`` hook + #. lock installroot + #. load Vars and lock varsdir + #. libdnf5 plugin ``post_base_setup`` hook +#. create repo sack +#. create repos from system configuration + * perform Vars substitution on repository id and all values (See :ref:`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 ``configure`` step +#. libdnf5 plugin ``repos_configured`` hook +#. if 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 gpg check + #. if required import repository gpg keys and try again +#. libdnf5 plugin ``repos_loaded`` hook +#. run command specific ``load_additional_packages`` step +#. run command specific ``run`` step +#. if the command produced a goal: + #. libdnf5 plugin ``pre_add_cmdline_packages`` hook + #. add commandline packages + #. libdnf5 plugin ``post_add_cmdline_packages`` hook + #. resolve goal (resolve dependencies) + #. run command specific ``goal_resolved`` step + #. print transaction table + #. check for user approval + #. download inbound transaction packages + #. check gpg signatures for inbound transaction packages + #. lock transaction ``libdnf5::utils::Locker`` + #. create rpm transaction + #. run rpm test transaction + #. libdnf5 plugin ``pre_transaction`` hook + #. start database transaction + #. run rpm transaction + #. update system_state (See :manpage:`dnf5-system-state(7)`, :ref:`System state ` for details.) + #. finish database transaction + #. libdnf5 plugin ``post_transaction`` hook + #. unlock transaction ``libdnf5::utils::Locker`` +#. libdnf5 plugin ``finish`` hook +#. dnf5 plugin ``finish`` hook diff --git a/doc/index.rst b/doc/index.rst index 001fc4d19..5fe6bf5b2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -10,6 +10,7 @@ Welcome to DNF5's documentation! tutorial/bindings/index tutorial/plugins/index api/index + dnf5_workflow libdnf5_plugins/index commands/index dnf5_plugins/index