dnf5 icon indicating copy to clipboard operation
dnf5 copied to clipboard

Implement module command

Open mcurlej opened this issue 2 years ago • 1 comments

  • [ ] Command: module

Modularity overview is available at man page dnf.modularity(7). Module subcommands take … arguments that specify modules or profiles.

  • [ ] dnf [options] module install <module-spec>...

Install module profiles, including their packages. In case no profile was provided, all default profiles get installed. Module streams get enabled accordingly.

This command cannot be used for switching module streams. Use the dnf module switch-to command for that.

  • [ ] dnf [options] module update <module-spec>...

Update packages associated with an active module stream, optionally restricted to a profile. If the profile_name is provided, only the packages referenced by that profile will be updated.

  • [ ] dnf [options] module switch-to <module-spec>...

This will be not implemented in DNF5. Please update transition page in the documentation.

  • [ ] dnf [options] module remove <module-spec>...

Remove installed module profiles, including packages that were installed with the dnf module install command. Will not remove packages required by other installed module profiles or by other user-installed packages. In case no profile was provided, all installed profiles get removed.

  • [ ] dnf [options] module remove --all <module-spec>...
    • the option was introduce as a workaround to switch modules
    • drop the option --all

Remove installed module profiles, including packages that were installed with the dnf module install command. With –all option it additionally removes all packages whose names are provided by specified modules. Packages required by other installed module profiles and packages whose names are also provided by any other module are not removed.

  • [x] dnf [options] module enable <module-spec>...

Enable a module stream and make the stream RPMs available in the package set.

Modular dependencies are resolved, dependencies checked and also recursively enabled. In case of modular dependency issue the operation will be rejected. To perform the action anyway please use --skip-broken option.

This command cannot be used for switching module streams. Use the dnf module switch-to command for that.

  • [x] dnf [options] module disable <module-name>...

Disable a module. All related module streams will become unavailable. Consequently, all installed profiles will be removed and the module RPMs will become unavailable in the package set. In case of modular dependency issue the operation will be rejected. To perform the action anyway please use --skip-broken option.

  • [x] dnf [options] module reset <module-name>...

Reset module state so it’s no longer enabled or disabled. Consequently, all installed profiles will be removed and only RPMs from the default stream will be available in the package set.

  • [ ] dnf [options] module provides <package-name-spec>...

Lists all modular packages matching <package-name-spec> from all modules (including disabled), along with the modules and streams they belong to.

  • [x] #938
    • drop --all option as redundant

Lists all module streams, their profiles and states (enabled, disabled, default).

  • [x] #936

Lists module streams that are enabled.

  • [x] #937

Lists module streams that are disabled.

  • [ ] dnf [options] module list --installed [module_name...]

List module streams with installed profiles.

  • [x] #990

Print detailed information about given module stream.

  • [ ] dnf [options] module info --profile <module-spec>...

Print detailed information about given module profiles.

  • [ ] dnf [options] module repoquery <module-spec>...

List all available packages belonging to selected modules.

  • [ ] dnf [options] module repoquery --available <module-spec>...

List all available packages belonging to selected modules.

  • [ ] dnf [options] module repoquery --installed <module-spec>...

List all installed packages with same name like packages belonging to selected modules.

mcurlej avatar Nov 11 '22 07:11 mcurlej

I'm missing displaying https://bugzilla.redhat.com/show_bug.cgi?id=2054662 and handling https://bugzilla.redhat.com/show_bug.cgi?id=2053213 modular obsoletes.

ppisar avatar Nov 23 '22 11:11 ppisar

Looks like dnf5 is now the default in Fedora 41 and module install functionality is still not implemented. Are there any known workarounds to utilize modularity streams?

kmittman avatar Oct 07 '24 23:10 kmittman

dnf module enable foo:bar && dnf install WHATERVER_PACKAGE_YOU_WANT. dnf module install installs packages belonging to a default profile of the stream. What profile is default could be visible in dnf module info foo:bar, what packages belong to that profile in dnf module info foo:bar.

ppisar avatar Oct 08 '24 12:10 ppisar