Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix arguments for install, upgrade and remove #1621

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 4 additions & 2 deletions doc/commands/group.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ Subcommands
``install``
Mark the specified groups installed and install packages it contains.
Also include optional packages of the group if the ``--with-optional`` option is
specified. All `Mandatory` and `Default` packages will be installed whenever
possible. `Conditional` packages are installed if they meet their requirement.
specified. By default all `Mandatory` and `Default` packages will be installed whenever
possible. `Conditional` packages are installed if they meet their requirement. This can
be configured by :manpage:`dnf5-conf(5)`, :ref:`group_package_types <group_package_types_options-label>`.

If the group is already (partially) installed, the command installs the missing
packages from the group.

Expand Down
18 changes: 14 additions & 4 deletions doc/commands/install.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,25 @@
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.
jan-kolarik marked this conversation as resolved.
Show resolved Hide resolved
If the specified packages are already installed, DNF5 does not check their dependencies again and
simply verifies that the packages themselves are present.

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
3 changes: 2 additions & 1 deletion doc/dnf5.conf.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ repository configuration file should aside from repo ID consists of baseurl, met

List of the following: ``optional``, ``default``, ``mandatory`` or ``conditional``.

Tells DNF5 which type of packages in groups will be installed when 'group install' is called.
Tells DNF5 which type of packages in groups will be installed when 'group install <group-spec>'
or 'install @<group-spec>' is called.

Default: ``default, mandatory, conditional``.

Expand Down
10 changes: 6 additions & 4 deletions doc/misc/specs.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,16 @@ Specifying File Provides
If a ``spec`` starts with either ``/`` or ``*/``, it is considered as a potential file provide.


Groups
Comps
======

``<group-spec>`` allows one to select (environment) groups a particular operation should work
on. It is a case insensitive string (supporting globbing characters) that is
matched against a group's ID, canonical name and name translated into the
``<group-spec>``|``<environment-spec>`` allows one to select groups|environments a particular
jan-kolarik marked this conversation as resolved.
Show resolved Hide resolved
operation should work on. It is a case insensitive string (supporting globbing characters) that
is matched against a group's|environment's ID, canonical name and name translated into the
current ``LC_MESSAGES`` locale (if possible).

Comps ``specs`` are prefixed by ``@`` for commands that also accept package ``specs``.
For example see :manpage:`dnf5-install(8)`, :ref:`Install Command <install_command_ref-label>`.

Modules
=======
Expand Down
Loading