Bug 1331662

Summary: yum won't install an older kernel-devel package when it's a dependency
Product: Red Hat Enterprise Linux 6 Reporter: Eva Mrakova <emrakova>
Component: yumAssignee: Valentina Mukhamedzhanova <vmukhame>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: emrakova, james.antill, mdomonko, mmatsuya, vmukhame
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1306142 Environment:
Last Closed: 2017-12-06 12:16:04 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: 1306142    
Bug Blocks:    

Description Eva Mrakova 2016-04-29 07:40:28 UTC
Also happens for yum-3.2.29-73.el6

+++ This bug was initially created as a clone of Bug #1306142 +++

Description of problem:

kernel-devel package is one of the packages which is allowed to install multiple version packages at the same time.

# yum -y install kernel-devel-3.10.0-123.el7
Loaded plugins: product-id, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:3.10.0-123.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================
 Package                          Arch                       Version                            Repository                                 Size
================================================================================================================================================
Installing:
 kernel-devel                     x86_64                     3.10.0-123.el7                     a-rhel7-x86_64-2015_3                     8.9 M

Transaction Summary
================================================================================================================================================
Install  1 Package

Total size: 8.9 M
Installed size: 34 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-devel-3.10.0-123.el7.x86_64                                                                                           1/1
  Verifying  : kernel-devel-3.10.0-123.el7.x86_64                                                                                           1/1

Installed:
  kernel-devel.x86_64 0:3.10.0-123.el7

Complete!

# rpm -q kernel-devel
kernel-devel-3.10.0-123.el7.x86_64
kernel-devel-3.10.0-229.14.1.el7.x86_64

But, when it's required as a dependency of a package installation,
yum rejects to install kernel-devel package since the newer package is already installed. 

The customer's custom rpm depends on the old kernel-devel, and they want it to install kernel-devel upon dependency resolving in yum command.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 7.2

How reproducible:
Always

Steps to Reproduce:
1. install RHEL7.2 and confirm kernel-devel is installed.
2. configure RHEL7.1 yum repository
3. install a testa package I attached.

# yum install testa-1.0-1.el7.x86_64.rpm

Actual results:
The older kernel-devel is not installed, though it's found as a dependency.
Because a newer kernel-devel is installed.

Expected results:
The older kernel-devel is installed to resolve the dependency without any error, even if a newer kernel-devel package is installed.

Additional info:

I will attach the testa package for testing, and proposed patch, which the customer verified.

...
--- Additional comment from Michal Domonkos on 2016-04-21 13:06:21 CEST ---

> Actual results:
> The older kernel-devel is not installed, though it's found as a dependency.
> Because a newer kernel-devel is installed.

This is the actual error message:

Transaction check error:
  package kernel-devel-3.10.0-326.el7.x86_64 (which is newer than kernel-devel-3.10.0-229.el7.x86_64) is already installed
  package kernel-devel-3.10.0-327.el7.x86_64 (which is newer than kernel-devel-3.10.0-229.el7.x86_64) is already installed
  package kernel-devel-3.10.0-382.el7.x86_64 (which is newer than kernel-devel-3.10.0-229.el7.x86_64) is already installed

Error Summary
-------------

--- Additional comment from Michal Domonkos on 2016-04-21 13:10 CEST ---

Final el7 patch, also pushed upstream as commit afac6a760b97b7dd71c06c00a4716d3212f6884c

Masahiro, thank you!

Comment 3 Jan Kurik 2017-12-06 12:16:04 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/