doc: minor formatting and consistency fixes

This patch includes some minor consistency fixes I noticed when reading
the man page:
- A few commands had extra blank lines before starting their description
  which was causing extra whitespace to be added to the description.
- Some information relevant to commands was nested under example
  commands because of leading whitespace (mostly the information about
  `-nevra` commands).
- Some example commands followed their description, while most other
  examples have the command first and then the description. This changes
  all examples to the latter for consistency.
- Renamed the `Examples` header to `Repoquery Examples` similar to other
  example headers
- Fixed typo in repoquery examples (ligttpd -> lighttpd)
- Added parameter names to `swap` description

Also this updates the man page file name in the README (dnf.8 -> dnf4.8)
This commit is contained in:
Sten Laane 2024-06-22 18:06:08 +03:00 committed by pkratoch
parent d29dfa0634
commit b06dca11f0
2 changed files with 44 additions and 57 deletions

View File

@ -57,7 +57,7 @@ If you want to build the manpages, use the option ``-DWITH_MAN=0`` with cmake.
Man pages will be located in ``build/doc`` and can be read with ``man -l``, e.g::
man -l build/doc/dnf.8
man -l build/doc/dnf4.8
=============================
Building and installing rpm

View File

@ -165,7 +165,6 @@ Options
.. _disableexcludes-label:
``--disableexcludes=[all|main|<repoid>], --disableexcludepkgs=[all|main|<repoid>]``
Disable the configuration file excludes. Takes one of the following three options:
* ``all``, disables all configuration file excludes
@ -541,7 +540,6 @@ Check-Update Command
``dnf [options] check-update [--changelogs] [<package-file-spec>...]``
Non-interactively checks if updates of the specified packages are available. If no ``<package-file-spec>`` is given, checks whether any updates at all are available for your system. DNF exit code will be 100 when there are updates available and a list of the updates will be printed, 0 if not and 1 if an error occurs. If ``--changelogs`` option is specified, also changelog delta of packages about to be updated is printed.
Please note that having a specific newer version available for an installed package (and reported by ``check-update``) does not imply that subsequent ``dnf upgrade`` will install it. The difference is that ``dnf upgrade`` has restrictions (like package dependencies being satisfied) to take into account.
@ -1205,9 +1203,9 @@ Remove Examples
Remove packages not present in any repository, but don't remove the ``tito``
and ``acpi`` packages (they still might be removed if they depend on some of the removed packages).
Remove older versions of duplicated packages (an equivalent of yum's `package-cleanup --cleandups`)::
``dnf remove --duplicates``
Remove older versions of duplicated packages (an equivalent of yum's `package-cleanup --cleandups`).
dnf remove --duplicates
.. _repoinfo_command-label:
@ -1476,52 +1474,41 @@ are displayed in the standard NEVRA notation.
resolve capabilities to originating package(s).
Examples
--------
Repoquery Examples
------------------
Display NEVRAs of all available packages matching ``light*``::
``dnf repoquery 'light*'``
Display NEVRAs of all available packages matching ``light*``
dnf repoquery 'light*'
``dnf repoquery-na 'light*.noarch'``
Display NEVRAs of all available packages matching name ``light*`` and architecture ``noarch`` (accepts only arguments in the "<name>.<arch>" format)
Display NEVRAs of all available packages matching name ``light*`` and architecture ``noarch`` (accepts only arguments in the "<name>.<arch>" format)::
``dnf repoquery --requires lighttpd``
Display requires of all lighttpd packages
dnf repoquery-na 'light*.noarch'
``dnf repoquery --requires python --resolve``
Display packages providing the requires of python packages
Display requires of all lighttpd packages::
``dnf repoquery --source lighttpd``
Display source rpm of lighttpd package
dnf repoquery --requires lighttpd
``dnf repoquery --file /etc/lighttpd/lighttpd.conf``
Display package name that owns the given file
Display packages providing the requires of python packages::
``dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd``
Display name, architecture and the containing repository of all lighttpd packages
dnf repoquery --requires python --resolve
``dnf repoquery --whatprovides webserver``
Display all available packages providing "webserver"
Display source rpm of ligttpd package::
``dnf repoquery --whatprovides webserver --arch i686``
Display all available packages providing "webserver" but only for "i686" architecture
dnf repoquery --source lighttpd
``dnf repoquery --duplicates``
Display duplicate packages
Display package name that owns the given file::
dnf repoquery --file /etc/lighttpd/lighttpd.conf
Display name, architecture and the containing repository of all lighttpd packages::
dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd
Display all available packages providing "webserver"::
dnf repoquery --whatprovides webserver
Display all available packages providing "webserver" but only for "i686" architecture::
dnf repoquery --whatprovides webserver --arch i686
Display duplicate packages::
dnf repoquery --duplicates
Display source packages that require a <provide> for a build::
dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src --whatrequires <provide>
``dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src --whatrequires <provide>``
Display source packages that require a <provide> for a build
.. _repository_packages_command-label:
@ -1669,7 +1656,7 @@ Swap Command
``dnf [options] swap <remove-spec> <install-spec>``
Remove spec and install spec in one transaction. Each ``<spec>`` can be either a
Remove ``remove-spec`` and install ``install-spec`` in one transaction. Each ``<spec>`` can be either a
:ref:`<package-spec> <specifying_packages-label>`, which specifies a package directly, or a
``@<group-spec>``, which specifies an (environment) group which contains it. Automatic
conflict solving is provided in DNF by the --allowerasing option that provides the functionality of the swap