Skip to content

Commit

Permalink
doc: Sync documentation in help and man pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-kolarik committed Mar 26, 2024
1 parent f637adf commit f3d6a22
Show file tree
Hide file tree
Showing 31 changed files with 203 additions and 118 deletions.
8 changes: 4 additions & 4 deletions dnf5-plugins/builddep_plugin/builddep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ void BuildDepCommand::set_argument_parser() {
});
cmd.register_positional_arg(specs);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);

auto defs = parser.add_new_named_arg("rpm_macros");
defs->set_short_name('D');
defs->set_long_name("define");
Expand All @@ -88,6 +84,10 @@ void BuildDepCommand::set_argument_parser() {
return true;
});
cmd.register_named_arg(defs);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
}

void BuildDepCommand::configure() {
Expand Down
6 changes: 3 additions & 3 deletions dnf5/commands/check-upgrade/check-upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ void CheckUpgradeCommand::set_argument_parser() {
cmd.register_positional_arg(keys);

advisory_name = std::make_unique<AdvisoryOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
advisory_security = std::make_unique<SecurityOption>(*this);
advisory_bugfix = std::make_unique<BugfixOption>(*this);
advisory_enhancement = std::make_unique<EnhancementOption>(*this);
advisory_newpackage = std::make_unique<NewpackageOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
}

void CheckUpgradeCommand::configure() {
Expand Down
2 changes: 1 addition & 1 deletion dnf5/commands/distro-sync/distro-sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void DistroSyncCommand::set_argument_parser() {
cmd.register_positional_arg(patterns_arg);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_offline_option(*this);
}

Expand Down
4 changes: 2 additions & 2 deletions dnf5/commands/downgrade/downgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ void DowngradeCommand::set_argument_parser() {
cmd.register_positional_arg(keys);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
create_downloadonly_option(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_offline_option(*this);
}

Expand Down
6 changes: 3 additions & 3 deletions dnf5/commands/download/download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ void DownloadCommand::set_argument_parser() {
});


cmd.register_named_arg(arch);
cmd.register_named_arg(resolve);
cmd.register_named_arg(alldeps);
create_destdir_option(*this);
cmd.register_named_arg(resolve);
cmd.register_positional_arg(keys);
cmd.register_named_arg(srpm);
cmd.register_named_arg(url);
cmd.register_named_arg(urlprotocol);
cmd.register_named_arg(arch);
cmd.register_positional_arg(keys);
}

void DownloadCommand::configure() {
Expand Down
2 changes: 1 addition & 1 deletion dnf5/commands/group/group_install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ void GroupInstallCommand::set_argument_parser() {
group_specs = std::make_unique<GroupSpecArguments>(*this, ArgumentParser::PositionalArg::AT_LEAST_ONE);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_offline_option(*this);
Expand Down
1 change: 1 addition & 0 deletions dnf5/commands/group/group_upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void GroupUpgradeCommand::set_argument_parser() {
allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_offline_option(*this);
}

Expand Down
15 changes: 7 additions & 8 deletions dnf5/commands/install/install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,20 @@ void InstallCommand::set_argument_parser() {
cmd.register_positional_arg(keys);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_offline_option(*this);

advisory_name = std::make_unique<AdvisoryOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
advisory_security = std::make_unique<SecurityOption>(*this);
advisory_bugfix = std::make_unique<BugfixOption>(*this);
advisory_enhancement = std::make_unique<EnhancementOption>(*this);
advisory_newpackage = std::make_unique<NewpackageOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);

auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
create_allow_downgrade_options(*this);
create_offline_option(*this);
}

void InstallCommand::configure() {
Expand Down
4 changes: 2 additions & 2 deletions dnf5/commands/offline/offline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ void OfflineCommand::set_argument_parser() {

void OfflineCommand::register_subcommands() {
register_subcommand(std::make_unique<OfflineCleanCommand>(get_context()));
register_subcommand(std::make_unique<OfflineRebootCommand>(get_context()));
register_subcommand(std::make_unique<OfflineExecuteCommand>(get_context()));
register_subcommand(std::make_unique<OfflineLogCommand>(get_context()));
register_subcommand(std::make_unique<OfflineRebootCommand>(get_context()));
register_subcommand(std::make_unique<OfflineStatusCommand>(get_context()));
register_subcommand(std::make_unique<OfflineExecuteCommand>(get_context()));
}

OfflineSubcommand::OfflineSubcommand(Context & context, const std::string & name) : Command(context, name) {}
Expand Down
4 changes: 2 additions & 2 deletions dnf5/commands/reinstall/reinstall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ void ReinstallCommand::set_argument_parser() {
cmd.register_positional_arg(keys);

allow_erasing = std::make_unique<AllowErasingOption>(*this);
create_downloadonly_option(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
auto skip_broken = std::make_unique<SkipBrokenOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_offline_option(*this);
}

Expand Down
6 changes: 3 additions & 3 deletions dnf5/commands/repoquery/repoquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ void RepoqueryCommand::set_argument_parser() {
// SIMPLE FILTERS:

advisory_name = std::make_unique<AdvisoryOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
advisory_security = std::make_unique<SecurityOption>(*this);
advisory_bugfix = std::make_unique<BugfixOption>(*this);
advisory_enhancement = std::make_unique<EnhancementOption>(*this);
advisory_newpackage = std::make_unique<NewpackageOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);

latest_limit_option = dynamic_cast<libdnf5::OptionNumber<std::int32_t> *>(
parser.add_init_value(std::make_unique<libdnf5::OptionNumber<std::int32_t>>(0)));
Expand Down
4 changes: 2 additions & 2 deletions dnf5/commands/system-upgrade/system-upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ void SystemUpgradeCommand::set_argument_parser() {
}

void SystemUpgradeCommand::register_subcommands() {
register_subcommand(std::make_unique<SystemUpgradeDownloadCommand>(get_context()));
register_subcommand(std::make_unique<OfflineCleanCommand>(get_context()));
register_subcommand(std::make_unique<OfflineRebootCommand>(get_context()));
register_subcommand(std::make_unique<SystemUpgradeDownloadCommand>(get_context()));
register_subcommand(std::make_unique<OfflineLogCommand>(get_context()));
register_subcommand(std::make_unique<OfflineRebootCommand>(get_context()));
}

void SystemUpgradeDownloadCommand::set_argument_parser() {
Expand Down
8 changes: 4 additions & 4 deletions dnf5/commands/upgrade/upgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@ void UpgradeCommand::set_argument_parser() {
allow_erasing = std::make_unique<AllowErasingOption>(*this);
auto skip_unavailable = std::make_unique<SkipUnavailableOption>(*this);
create_allow_downgrade_options(*this);
create_downloadonly_option(*this);
create_destdir_option(*this);
create_downloadonly_option(*this);
auto & destdir = parser.get_named_arg("upgrade.destdir", false);
destdir.set_description(destdir.get_description() + " Automatically sets the --downloadonly option.");
create_offline_option(*this);

advisory_name = std::make_unique<AdvisoryOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
advisory_security = std::make_unique<SecurityOption>(*this);
advisory_bugfix = std::make_unique<BugfixOption>(*this);
advisory_enhancement = std::make_unique<EnhancementOption>(*this);
advisory_newpackage = std::make_unique<NewpackageOption>(*this);
advisory_severity = std::make_unique<AdvisorySeverityOption>(*this);
advisory_bz = std::make_unique<BzOption>(*this);
advisory_cve = std::make_unique<CveOption>(*this);
}

void UpgradeCommand::configure() {
Expand Down
4 changes: 2 additions & 2 deletions dnf5/commands/versionlock/versionlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ void VersionlockCommand::register_subcommands() {
auto * commands_group = get_context().get_argument_parser().add_new_group("versionlock_commands");
commands_group->set_header("Versionlock Commands:");
get_argument_parser_command()->register_group(commands_group);
register_subcommand(std::make_unique<VersionlockListCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockAddCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockExcludeCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockDeleteCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockClearCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockDeleteCommand>(get_context()), commands_group);
register_subcommand(std::make_unique<VersionlockListCommand>(get_context()), commands_group);
}

void VersionlockCommand::pre_configure() {
Expand Down
7 changes: 7 additions & 0 deletions doc/commands/autoremove.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ any such package.

Installonly packages (e.g. kernels) are never automatically removed by this
command even if they were installed as dependencies.


Options
=======

``--offline``
| Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.
9 changes: 9 additions & 0 deletions doc/commands/downgrade.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ Options
``--skip-unavailable``
| Allow skipping packages that are not possible to downgrade. All remaining packages will be downgraded.
``--allow-downgrade``
| Enable downgrade of dependencies when resolving the requested operation.
``--no-allow-downgrade``
| Disable downgrade of dependencies when resolving the requested operation.
``--downloadonly``
| Download the resolved package set without executing an RPM transaction.
``--offline``
| Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.
Expand Down
11 changes: 6 additions & 5 deletions doc/commands/download.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ defined in ``package-spec`` arguments to the current working directory.
Options
=======

``--arch``
| Limit to packages of given architectures. This option can be used multiple times.
``--resolve``
| Resolve dependencies of specified packages and download missing ones.
Expand All @@ -47,17 +50,15 @@ Options
``--destdir=<path>``
| Set directory used for downloading packages to. Default location is to the current working directory.
``--srpm``
| Download the source rpm. Enables source repositories of all enabled binary repositories.
``--url``
| Prints the list of URLs where the rpms can be downloaded instead of downloading.
``--urlprotocol``
| To be used together with ``--url``. It filters out the URLs to the specified protocols: ``http``, ``https``, ``ftp``, or ``file``. This option can be used multiple times.
``--arch``
| Limit to packages of given architectures. This option can be used multiple times.
``--srpm``
| Download the source rpm. Enables source repositories of all enabled binary repositories.

Examples
========
Expand Down
45 changes: 33 additions & 12 deletions doc/commands/group.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ Subcommands
a different reason (e.g. explicitly installed by a user or implicitly
installed as a dependency).

Options
=======

Options for ``list`` and ``info``
=================================

``--available``
| Show only available groups. Those which are not installed, but known to ``DNF5``.
Expand All @@ -93,27 +94,47 @@ Options
``--hidden``
| Show also hidden groups.
``--contains-pkgs``
| Show only groups containing packages with specified names. List option, supports globs.

Options for ``install``, ``remove`` and ``upgrade``
===================================================

``--with-optional``
| Used with ``install`` command to include optional packages from the groups.
| Include optional packages from the groups.
| Used with ``install`` command.
``--no-packages``
| Used with ``install`` and ``remove`` commands to operate exclusively on the groups without manipulating any packages.
``--contains-pkgs``
| Show only groups containing packages with specified names. List option, supports globs.
| Operate exclusively on the groups without manipulating any packages.
| Used with ``install`` and ``remove`` commands.
``--allowerasing``
| Used with ``install`` and ``upgrade`` to allow erasing of installed packages to resolve any potential dependency problems.
| Allow erasing of installed packages to resolve any potential dependency problems.
| Used with ``install`` and ``upgrade`` commands.
``--skip-broken``
| Used with ``install`` command to resolve any dependency problems by removing packages that are causing problems from the transaction.
| Resolve any dependency problems by removing packages that are causing problems from the transaction.
| Used with ``install`` command.
``--skip-unavailable``
| Used with ``install`` and ``upgrade`` to allow skipping packages that are not possible to install or upgrade.
| All remaining packages will be installed or upgraded.
| Allow skipping packages that are not possible to install or upgrade.
| Used with ``install`` and ``upgrade`` commands.
``--allow-downgrade``
| Enable downgrade of dependencies when resolving the requested operation.
| Used with ``install`` and ``upgrade`` commands.
``--no-allow-downgrade``
| Disable downgrade of dependencies when resolving the requested operation.
| Used with ``install`` and ``upgrade`` commands.
``--downloadonly``
| Download the resolved package set without executing an RPM transaction.
| Used with ``install`` and ``upgrade`` commands.
``--offline``
| Used with ``install``, ``remove``, and ``upgrade``. Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.
| Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.

Examples
Expand Down
15 changes: 12 additions & 3 deletions doc/commands/install.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ Options
``--skip-unavailable``
| Allow skipping packages that are not available in repositories. All available packages will be installed.
``--allow-downgrade``
| Enable downgrade of dependencies when resolving the requested operation.
``--no-allow-downgrade``
| Disable downgrade of dependencies when resolving the requested operation.
``--downloadonly``
| Download the resolved package set without executing an RPM transaction.
``--offline``
| Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.
``--advisories=ADVISORY_NAME,...``
| Consider only content contained in advisories with specified name.
| This is a list option.
Expand Down Expand Up @@ -80,9 +92,6 @@ Options
``--newpackage``
| Consider only content contained in newpackage advisories.
``--offline``
| Store the transaction to be performed offline. See :manpage:`dnf5-offline(8)`, :ref:`Offline command <offline_command_ref-label>`.

Examples
========
Expand Down
Loading

0 comments on commit f3d6a22

Please sign in to comment.