Bug 1706215 - using the @ module syntax for yum4 avoids the stream switching error protection
Summary: using the @ module syntax for yum4 avoids the stream switching error protection
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: yum
Version: 8.1
Hardware: All
OS: All
medium
high
Target Milestone: rc
: 8.0
Assignee: Jaroslav Mracek
QA Contact: Eva Mrakova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-03 20:00 UTC by jcastran
Modified: 2020-11-14 06:59 UTC (History)
5 users (show)

Fixed In Version: dnf-4.2.7-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:22:06 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3583 None None None 2019-11-05 22:22:15 UTC

Description jcastran 2019-05-03 20:00:13 UTC
Description of problem:
Trying to enable a module when another stream is installed will fail BUT installing it with "yum install @module" will enable and install it though it shouldn't.

~~~~~~~~~~~~~~~~~~ Expected Behavior ~~~~~~~~~~~~~~~~~~
# yum module enable php:7.2
Updating Subscription Management repositories.
Last metadata expiration check: 0:26:35 ago on Fri 03 May 2019 03:25:21 PM EDT.
The operation would result in switching of module 'php' stream '7.1' to stream '7.2'
Error: It is not possible to switch enabled streams of a module.
It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can enable the other stream.

# yum module install php:7.2
Updating Subscription Management repositories.
Last metadata expiration check: 0:33:14 ago on Fri 03 May 2019 03:25:21 PM EDT.
The operation would result in switching of module 'php' stream '7.1' to stream '7.2'
Error: It is not possible to switch enabled streams of a module.
It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.

~~~~~~~~~~~~~~~~~~ Error ~~~~~~~~~~~~~~~~~~
# yum install @php:7.2
Updating Subscription Management repositories.
Last metadata expiration check: 0:32:41 ago on Fri 03 May 2019 03:25:21 PM EDT.
Dependencies resolved.
========================================================================
 Package         Arch           Version           Repository       Size
========================================================================
Switching module streams:
 php                            7.1 -> 7.2                             

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

Is this ok [y/N]: 


Version-Release number of selected component (if applicable):
RHEL *

How reproducible:
Everytime

Steps to Reproduce:
1. # yum install @php:7.1
2. # yum install @php:7.2
3.

Actual results:
Switching module streams:
 php                            7.1 -> 7.2                             

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


Expected results:
Error: It is not possible to switch enabled streams of a module.
It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can enable the other stream.





Additional info:

Comment 1 Jaroslav Mracek 2019-06-19 10:50:56 UTC
I created a patch that resolves the issue for "dnf install @module" command - https://github.com/rpm-software-management/dnf/pull/1416

Comment 2 Jaroslav Mracek 2019-06-20 10:48:13 UTC
Tests included here: https://github.com/rpm-software-management/ci-dnf-stack/pull/565

Comment 8 errata-xmlrpc 2019-11-05 22:22:06 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/RHSA-2019:3583


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