RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1758447 - dnf module disable <module:stream> disables all streams
Summary: dnf module disable <module:stream> disables all streams
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-04 07:48 UTC by Michael Mráka
Modified: 2023-07-11 23:23 UTC (History)
4 users (show)

Fixed In Version: dnf-4.2.17-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:48:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:48:54 UTC

Description Michael Mráka 2019-10-04 07:48:00 UTC
Description of problem:
dnf module disable <module:stream> disables all streams

Version-Release number of selected component (if applicable):
dnf-4.0.9.2-5.el8.noarch


How reproducible:
always

Steps to Reproduce:
1. dnf module list perl
Updating Subscription Management repositories.
Last metadata expiration check: 0:03:44 ago on Fri Oct  4 07:31:13 2019.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Name         Stream           Profiles                    Summary                                         
perl         5.24             common [d], minimal         Practical Extraction and Report Language        
perl         5.26 [d]         common [d], minimal         Practical Extraction and Report Language        

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled


2. dnf module disable perl:5.24
Updating Subscription Management repositories.
Last metadata expiration check: 0:03:44 ago on Fri Oct  4 07:31:13 2019.
Problems in request:
Modular dependency problems with Defaults:

 Problem 1: module freeradius:3.0:820190131191847:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - conflicting requests
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 2: module freeradius:3.0:8000020190425181943:75ec4169-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - conflicting requests
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 3: conflicting requests
  - module perl-App-cpanminus:1.7044:820181214184336:4f58e9d5-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-App-cpanminus:1.7044:820181214184336:e5ce1481-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 4: conflicting requests
  - module perl-YAML:1.24:820181214175558:7c757546-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-YAML:1.24:820181214175558:8652dbeb-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 5: conflicting requests
  - module perl-FCGI:0.78:820181214153815:082fdf2f-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-FCGI:0.78:820181214153815:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 6: conflicting requests
  - module perl-DBD-SQLite:1.58:820181214121133:0cdc2006-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-SQLite:1.58:820181214121133:6bc6cad6-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 7: conflicting requests
  - module perl-DBI:1.641:820190116185335:082fdf2f-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBI:1.641:820190116185335:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 8: conflicting requests
  - module perl-DBD-MySQL:4.046:820181214121012:0cdc2006-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-MySQL:4.046:820181214121012:6bc6cad6-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 9: conflicting requests
  - module perl-DBD-Pg:3.7:820181214121102:956b9ee3-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-Pg:3.7:820181214121102:6fcea174-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
Dependencies resolved.
==========================================================================================================
 Package                  Arch                    Version                  Repository                Size
==========================================================================================================
Disabling module streams:
 perl                                                                                                    

Transaction Summary
==========================================================================================================

Is this ok [y/N]: y
Complete!


3. dnf --disablerepo=ubi*,epel,copr* module list perl        
Updating Subscription Management repositories.
Last metadata expiration check: 0:05:25 ago on Fri Oct  4 07:31:13 2019.
Modular dependency problems:

 Problem 1: module freeradius:3.0:820190131191847:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - conflicting requests
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 2: module freeradius:3.0:8000020190425181943:75ec4169-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - conflicting requests
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 3: conflicting requests
  - module perl-App-cpanminus:1.7044:820181214184336:4f58e9d5-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-App-cpanminus:1.7044:820181214184336:e5ce1481-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 4: conflicting requests
  - module perl-YAML:1.24:820181214175558:7c757546-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-YAML:1.24:820181214175558:8652dbeb-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 5: conflicting requests
  - module perl-FCGI:0.78:820181214153815:082fdf2f-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-FCGI:0.78:820181214153815:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 6: conflicting requests
  - module perl-DBD-SQLite:1.58:820181214121133:0cdc2006-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-SQLite:1.58:820181214121133:6bc6cad6-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 7: conflicting requests
  - module perl-DBI:1.641:820190116185335:082fdf2f-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBI:1.641:820190116185335:fbe42456-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 8: conflicting requests
  - module perl-DBD-MySQL:4.046:820181214121012:0cdc2006-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-MySQL:4.046:820181214121012:6bc6cad6-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
 Problem 9: conflicting requests
  - module perl-DBD-Pg:3.7:820181214121102:956b9ee3-0.x86_64 requires module(perl:5.24), but none of the providers can be installed
  - module perl-DBD-Pg:3.7:820181214121102:6fcea174-0.x86_64 requires module(perl:5.26), but none of the providers can be installed
  - module perl:5.24:820190207164249:ee766497-0.x86_64 is disabled
  - module perl:5.26:820181219174508:9edba152-0.x86_64 is disabled
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Name                                   Stream                                        Profiles                                              Summary                                                                   
perl                                   5.24 [x]                                      common [d], minimal                                   Practical Extraction and Report Language                                  
perl                                   5.26 [d][x]                                   common [d], minimal                                   Practical Extraction and Report Language                                  

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled


Actual results:
see steps to reproduce

Expected results:
only perl 5.24 module disabled, i.e.

Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Name                                   Stream                                        Profiles                                              Summary                                                                   
perl                                   5.24 [x]                                      common [d], minimal                                   Practical Extraction and Report Language                                  
perl                                   5.26 [d]                                      common [d], minimal                                   Practical Extraction and Report Language                    

Additional info:

Comment 1 Marek Blaha 2019-10-08 05:40:51 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?

Comment 2 Michael Mráka 2019-10-08 08:03:49 UTC
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'.

Comment 3 Michael Mráka 2019-10-08 08:07:19 UTC
BTW there's no man page in a container which is why a sentence buried somewhere in a man page is not sufficient.

Comment 4 Marek Blaha 2019-12-06 08:24:42 UTC
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

Comment 10 errata-xmlrpc 2020-04-28 16:48:23 UTC
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


Note You need to log in before you can comment on or make changes to this bug.