Skip to content

Commit

Permalink
doc: fix arguments for install, upgrade and remove
Browse files Browse the repository at this point in the history
For: #1602
For: #1498
  • Loading branch information
kontura committed Aug 12, 2024
1 parent 67e989b commit 9fc9119
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dnf5/commands/install/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void InstallCommand::set_argument_parser() {
cmd.set_description("Install software");

auto keys = parser.add_new_positional_arg("specs", ArgumentParser::PositionalArg::AT_LEAST_ONE, nullptr, nullptr);
keys->set_description("List of package specs to install");
keys->set_description("List of <package-spec>|@<group-spec>|@<environment-spec> to install");
keys->set_parse_hook_func(
[this]([[maybe_unused]] ArgumentParser::PositionalArg * arg, int argc, const char * const argv[]) {
for (int i = 0; i < argc; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion dnf5/commands/remove/remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void RemoveCommand::set_argument_parser() {
cmd.register_named_arg(noautoremove);

auto keys = parser.add_new_positional_arg("specs", ArgumentParser::PositionalArg::AT_LEAST_ONE, nullptr, nullptr);
keys->set_description("List of package specs to remove");
keys->set_description("List of <package-spec>|@<group-spec>|@<environment-spec> to remove");
keys->set_parse_hook_func(
[this]([[maybe_unused]] ArgumentParser::PositionalArg * arg, int argc, const char * const argv[]) {
for (int i = 0; i < argc; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion dnf5/commands/upgrade/upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void UpgradeCommand::set_argument_parser() {
cmd.register_named_arg(minimal_opt);

auto keys = parser.add_new_positional_arg("specs", ArgumentParser::PositionalArg::UNLIMITED, nullptr, nullptr);
keys->set_description("List of package specs to upgrade");
keys->set_description("List of [<package-spec>|@<group-spec>|@<environment-spec>] to upgrade");
keys->set_parse_hook_func(
[this]([[maybe_unused]] ArgumentParser::PositionalArg * arg, int argc, const char * const argv[]) {
for (int i = 0; i < argc; ++i) {
Expand Down
16 changes: 12 additions & 4 deletions doc/commands/install.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,23 @@
Synopsis
========

``dnf5 install [options] <package-spec>...``
``dnf5 install [options] <package-spec>|@<group-spec>|@<environment-spec>...``


Description
===========

The ``install`` command in ``DNF5`` is used for installing packages. It makes sure that
all given packages defined in ``package-spec`` arguments and their dependencies are installed
on the system. Environments can be installed with ``@environment-id`` as ``<package-spec>``.
The ``install`` command in ``DNF5`` is used for installing packages, groups or environments.

When installing packages defined in ``package-spec`` arguments, ``DNF5`` ensures that the packages
and their dependencies are installed on the system.

When installing groups defined in ``group-spec`` arguments, ``DNF5`` ensures that the groups and
their packages are installed on the system. Installs only group packages matching configured package
type. See :manpage:`dnf5-conf(5)`, :ref:`group_package_types <group_package_types_options-label>`.

When installing environments defined in ``environment-spec`` arguments, ``DNF5`` ensures that the
environments and their groups are installed on the system.


Options
Expand Down
6 changes: 3 additions & 3 deletions doc/commands/remove.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
Synopsis
========

``dnf5 remove [options] [<spec>...]``
``dnf5 remove [options] <package-file-spec>|@<group-spec>|@<environment-spec>...``


Description
===========

The ``remove`` command in ``DNF5`` is used for removing installed packages from the system.
Arguments defined in ``spec`` list are used as ``<package-file-spec>``.
The ``remove`` command in ``DNF5`` is used for removing installed packages, groups or
environments from the system.

If you want to keep the dependencies that were installed together with the given package,
set the ``clean_requirements_on_remove`` configuration option to ``False``.
Expand Down
11 changes: 8 additions & 3 deletions doc/commands/upgrade.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,19 @@
Synopsis
========

``dnf5 upgrade [options] [<package-spec>...]``
``dnf5 upgrade [options] [<package-spec>|@<group-spec>|@<environment-spec>...]``


Description
===========

The ``upgrade`` command in ``DNF5`` is used for upgrading installed packages to the
newer available version.
The ``upgrade`` command in ``DNF5`` is used for upgrading installed packages, groups or
environments to newer available version.

Since groups and environments are not versioned the upgrade basically means a synchronization
with the currently available definition. In addition group upgrade also upgrades all packages
the group contains and environment upgrade also upgrades all groups the environment contains.



Options
Expand Down

0 comments on commit 9fc9119

Please sign in to comment.