Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1656782

Summary: When switch module stream failed, the [i]nstalled display wrong.
Product: Red Hat Enterprise Linux 8 Reporter: fzxiaomange <cyent>
Component: libdnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Blaha <mblaha>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0CC: cyent, dkutalek, dmach, james.antill, mblaha
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libdnf-0.22.4-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 01:25:31 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:
Bug Depends On:    
Bug Blocks: 1649352    

Description fzxiaomange 2018-12-06 10:11:28 UTC
Description of problem:
When switch the module stream failed, the metadata [i]nstalled display not correct.

Version-Release number of selected component (if applicable):
rhel8.0 beta

How reproducible:
First, `yum module install nodejs:8` , It's Ok.
Then,  `yum module install nodejs:10`, It's Ok.
Then,  `yum module install nodejs:8` , It occers error:
------------
Error: Transaction check error:
  file /usr/lib/node_modules/npm/node_modules/JSONStream from install of npm-1:5.6.0-1.8.11.4.2.el8+2022+2ec55091.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.2.el8+2021+27085a9b.x86_64
  file /usr/lib/node_modules/npm/node_modules/abbrev from install of npm-1:5.6.0-1.8.11.4.2.el8+2022+2ec55091.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.2.el8+2021+27085a9b.x86_64
  file /usr/lib/node_modules/npm/node_modules/ansi-regex from install of npm-1:5.6.0-1.8.11.4.2.el8+2022+2ec55091.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.2.el8+2021+27085a9b.x86_64
  file /usr/lib/node_modules/npm/node_modules/ansicolors from install of npm-1:5.6.0-1.8.11.4.2.el8+2022+2ec55091.x86_64 conflicts with file from package npm-1:6.4.1-1.10.11.0.2.el8+2021+27085a9b.x86_64
------------

At this time, `rpm -qa | grep nodejs`, it display:
nodejs-10.11.0-2.el8+2021+27085a9b.x86_64.  It's correct because install nodejs:8 failed.

But, `yum module list`, it display:
nodejs  10 [d]  development, minimal, s2i, default [d]       Javascript runtime
nodejs  8 [e]   development, minimal, s2i, default [d] [i]   Javascript runtime
It's not correct because the existing nodejs is nodejs 10, not 8. At this time, the [i] should be in nodejs 10

Comment 2 Jaroslav Mracek 2018-12-11 09:09:37 UTC
I create a patch that changed behavior of DNF (https://github.com/rpm-software-management/libdnf/commit/f2ea82cbd92a439153f2135040082912a7fa8533). If module enable or disable is requested, DNF will remove all information about installed profiles, but packages will remain on the system. Please is it solving your problem?

Comment 3 fzxiaomange 2018-12-12 02:20:33 UTC
(In reply to Jaroslav Mracek from comment #2)
> I create a patch that changed behavior of DNF
> (https://github.com/rpm-software-management/libdnf/commit/
> f2ea82cbd92a439153f2135040082912a7fa8533). If module enable or disable is
> requested, DNF will remove all information about installed profiles, but
> packages will remain on the system. Please is it solving your problem?

Sorry, I don't understand your meaning

"DNF will remove all information about installed profiles" mean that whatever the `yum install` is successful or failed, it both delete [i] ? So, you discard the [i] tag ?