Bug 2225221

Summary: dnf outputs a Problem when an older version of an installed module has a requirement thats no longer available
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED CANTFIX QA Contact: swm-qe
Severity: medium Docs Contact:
Priority: medium    
Version: 8.8CC: james.antill
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-01 11:54:48 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 jcastran 2023-07-24 16:07:29 UTC
Description of problem:
dnf outputs module requirement "Problems" when an older version of an installed/enabled/default module can't find its requirements. Even though we are using a newer version of the same stream.

~~~
# yum module list
 Problem: module php:7.2:820181215112050:76554e01.x86_64 requires module(nginx:1.14), but none of the providers can be installed
  - module nginx:1.14:820181214004940:9edba152.x86_64 conflicts with module(nginx:1.20) provided by nginx:1.20:8050020210820165208:b4937e53.x86_64
  - module nginx:1.20:8050020210820165208:b4937e53.x86_64 conflicts with module(nginx:1.14) provided by nginx:1.14:820181214004940:9edba152.x86_64
  - module nginx:1.20:8050020210820165208:b4937e53.x86_64 conflicts with module(nginx:1.14) provided by nginx:1.14:8000020190830002848:f8e95b4e.x86_64
  - module nginx:1.14:8000020190830002848:f8e95b4e.x86_64 conflicts with module(nginx:1.20) provided by nginx:1.20:8050020210820165208:b4937e53.x86_64
 <Valid Module List output follows>

~~~


Only one version of php:7.2 requires nginx:1.14 but if enable a different stream of nginx and install a version of php:7.2 that doesn't require nginx:1.14, dnf won't stop outputting a Problem

~~~
# yum module info php:7.2 | egrep 'Name|Version|Context|Requires|nginx'
Name             : php
Version          : 820181215112050
Context          : 76554e01
Requires         : httpd:[2.4]
                 : nginx:[1.14]

Name             : php
Version          : 8010020190515110014
Context          : 2430b045
Requires         : httpd:[2.4]
                 : nginx:[]

Name             : php
Version          : 8010020191030112723
Context          : dcfb48bd
Requires         : httpd:[2.4]
                 : nginx:[]

Name             : php
Version          : 8020020191108065827
Context          : 2c7ca891
Requires         : httpd:[2.4]
                 : nginx:[]
~~~

Version-Release number of selected component (if applicable):
dnf-4.7.0-16.el8_8.noarch

Steps to Reproduce:
1. Fresh RHEL 8 machine
2. # dnf module enable nginx:1.20 -y
3. # dnf install php -y
4. Php installs but now all module commands have a warning.
4b. # yum module list


Actual results:
 Problem: module php:7.2:820181215112050:76554e01.x86_64 requires module(nginx:1.14), but none of the providers can be installed
  - module nginx:1.14:820181214004940:9edba152.x86_64 conflicts with module(nginx:1.20) provided by nginx:1.20:8050020210820165208:b4937e53.x86_64
  - module nginx:1.20:8050020210820165208:b4937e53.x86_64 conflicts with module(nginx:1.14) provided by nginx:1.14:820181214004940:9edba152.x86_64
  - module nginx:1.20:8050020210820165208:b4937e53.x86_64 conflicts with module(nginx:1.14) provided by nginx:1.14:8000020190830002848:f8e95b4e.x86_64
  - module nginx:1.14:8000020190830002848:f8e95b4e.x86_64 conflicts with module(nginx:1.20) provided by nginx:1.20:8050020210820165208:b4937e53.x86_64


Expected results:
This should not be present when using a different version of <module> that doesn't have the same requirement.



Additional info: