Bug 1082682

Summary: RFE: yum localupdate should create tmp repo. (so we don't get extra multilib packages)
Product: Red Hat Enterprise Linux 7 Reporter: Karel Srot <ksrot>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: high    
Version: 7.0CC: james.antill, vmukhame
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-18 16:38:49 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: 1113520    

Description Karel Srot 2014-03-31 15:31:35 UTC
Description of problem:

yum localupdate *.rpm installs all multilib packages instead of updating just a single (installed) architecture.

This is a regression against RHEL-6.

Version-Release number of selected component (if applicable):
yum-3.4.3-116.el7

How reproducible:
always

Steps to Reproduce:
1. rpm -qa | grep bz683946test
bz683946test-libs-1.0-1.x86_64
bz683946test-1.0-1.x86_64
2. yum -y --nogpgcheck localupdate bz683946test-1.0-2.x86_64.rpm bz683946test-libs-1.0-2.x86_64.rpm bz683946test-1.0-2.i386.rpm bz683946test-libs-1.0-2.i386.rpm
3. rpm -qa | grep bz683946test
bz683946test-libs-1.0-2.i386
bz683946test-libs-1.0-2.x86_64
bz683946test-1.0-2.x86_64
bz683946test-1.0-2.i386


Actual results:


Expected results:


Additional info:

Comment 4 James Antill 2014-11-18 16:38:49 UTC
> yum localupdate *.rpm installs all multilib packages instead of updating just a single (installed) architecture.

The root bug here has been reported before, certainly in el6 ... maybe in el5 too. Basically everything thinks that should do the same thing as:

yum --tmprepo=. upgrade

...but it doesn't. It works a lot more like:

for i in *.rpm; yum upgrade $i

...so yum sees "yum upgrade foo-1-2.i686.rpm" (because i686 sorts before x86_64 in shell expansion) and has foo-1-1.x86_64.rpm installed ... this should work, as it's possible to upgrade across arches. There have been bugs reported about it not working and those were fixed (hence the difference from el6 to el7).
 Now if you reorder the commands so that yum sees the x86_64 upgrade before the i686, it'll probably workaround it (not tested), but yum can't see into the future and as I said making upgrade *.rpm work like --tmprepo=. has been an RFE before, but it's non-trivial to fix.

 I believe dnf does work this way, and you can work around it a number of ways in yum (and it's very unlikely to be fixed "properly" in yum). So I'm just going to close it.