Bug 1758447
| Summary: | dnf module disable <module:stream> disables all streams | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Michael Mráka <mmraka> |
| Component: | dnf | Assignee: | Marek Blaha <mblaha> |
| Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
| Severity: | high | Docs Contact: | |
| Priority: | low | ||
| Version: | 8.0 | CC: | amatej, james.antill, mblaha, travneff |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | dnf-4.2.17-4.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 16:48:23 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Michael Mráka
2019-10-04 07:48:00 UTC
Yes, this is intended behaviour of the "module disable" command. In newer versions this is also documented in the man page and reported to the user:
# rpm -q dnf libdnf
dnf-4.2.12-1.git.8979.3080966.fc30.noarch
libdnf-0.35.5-2ge5a51f77.fc30.x86_64
# dnf module disable perl:5.26
Only module name is required. Ignoring unneeded information in argument: 'perl:5.26'
Dependencies resolved.
==========================================================================================
Package Architecture Version Repository Size
==========================================================================================
Disabling modules:
perl
Transaction Summary
==========================================================================================
# man dnf
----- 8< -------
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.
----- 8< -------
So you can enable *module stream* which you want to consume, and there can be only one enabled stream, but you disable *module* as a whole.
Do you have use case which requires disabling only specific module stream? Or is backporting enhanced documentation sufficient solution?
The way it's reported on Fedora 30 is bad. As you can see in comment #0 there's a lot of other error messages reported in dnf module disable perl:5.24 which will cause that Only module name is required. Ignoring unneeded information in argument: 'perl:5.26' line will scroll up, out of the terminal. Much better way would be to display this information in the final report like ========================================================================================== Package Architecture Version Repository Size ========================================================================================== Disabling modules: perl:5.24 perl:5.26 > Do you have use case which requires disabling only specific module stream? Only as a workaround for different dnf bugs (e.g. bug #1758459). > Or is backporting enhanced documentation sufficient solution? Well, the man page actually contains this sentence. But it is easy to overlook it. There should be big/bold warning at least. And even better if you can't disable specific stream then dnf module disable perl:5.24 should better fail with error like 'Specific module stream can't be disabled, if you want to disable all module streams use: dnf module disable perl'. BTW there's no man page in a container which is why a sentence buried somewhere in a man page is not sufficient. The reporting of disabled modules was changed based on the bug https://bugzilla.redhat.com/show_bug.cgi?id=1677640. Originally dnf used to report the stream that was disabled but this is not consistent with what dnf actually do - it disables the module, there is no way how to disable particular stream. The warning was added due to the bug https://bugzilla.redhat.com/show_bug.cgi?id=1649261. What I can do is to improve help printed by `dnf module --help` command to explicitly mention that `dnf module disable` command disable whole module with all its streams: PR https://github.com/rpm-software-management/dnf/pull/1547 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:1823 |