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 1361609 - Yum changes arch of package if repository becomes out of sync
Summary: Yum changes arch of package if repository becomes out of sync
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Eva Mrakova
URL:
Whiteboard:
: 1428716 (view as bug list)
Depends On:
Blocks: 1298243 1420851 1465896 1466368
TreeView+ depends on / blocked
 
Reported: 2016-07-29 13:49 UTC by Terry Bowling
Modified: 2021-09-09 11:54 UTC (History)
7 users (show)

Fixed In Version: yum-3.4.3-156.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 15:05:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dummy-1-1.x86_64.rpm (1.46 KB, application/x-rpm)
2016-07-29 13:51 UTC, Terry Bowling
no flags Details
dummy-1-2.i686.rpm (1.52 KB, application/x-rpm)
2016-07-29 13:52 UTC, Terry Bowling
no flags Details
testrepo.repo (113 bytes, text/plain)
2016-07-29 13:54 UTC, Terry Bowling
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0845 0 None None None 2018-04-10 15:07:10 UTC

Description Terry Bowling 2016-07-29 13:49:03 UTC
Description of problem:

yum is not honoring the preferred hardware architecture when updating packages.  For example, repository containing:

	===========================================
	Package  Arch   Version     Repository
	===========================================
	dummy.x86_64     1-1        testrepo
	dummy.i686       1-2        testrepo

Yum will install dummy-1-2.i686 because the version is newer, even though the x86_64 version is already installed.

This is true even when /etc/yum.conf has the following directives set:

	exactarch=1
	multilib_policy=best
	protected_multilib=1

It is understood that it is bad form to have the package versions/arch out of sync like this.  However, the concern is that in the event that a problem occurred and the repository *accidentally* became out of sync, the expectation is that yum should fail to warn of the issue rather than simply change arch of many packages potentially causing a disruption of service.

	# yum update dummy.x86_64
	testrepo       | 2.9 kB  00:00:00     
	Resolving Dependencies
	--> Running transaction check
	---> Package dummy.x86_64 0:1-1 will be updated
	---> Package dummy.i686 0:1-2 will be an update
	--> Finished Dependency Resolution
	
	Dependencies Resolved
	===================================================================================
	 Package            Arch              Version          Repository             Size
	===================================================================================
	Updating:
	 dummy              i686              1-2              testrepo              1.5 k
	
	Transaction Summary
	===================================================================================
	Upgrade  1 Package

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

	RHEL 7.2
	yum-3.4.3-132.el7.noarch
	rpm-4.11.3-17.el7.x86_64

How reproducible:

Steps to Reproduce:
1.  yum install -y createrepo httpd

2.  systemctl start httpd

3.  Copy attached rpms (dummy-1-1.x86_64.rpm  dummy-1-2.i686.rpm) 
	to /var/www/html/testrepo

4.  Copy attached testrepo.repo into /etc/yum.repo.d/

5.  Add the following directives to /etc/yum.conf
	exactarch=1
	multilib_policy=best
	protected_multilib=1

6.  confirm the test repo configured
	yum repolist 

7.  confirm both packages available from repo
	yum list dummy

8.  Install dummy.  Note that it installs lower versioned, x86_64 package
	yum install dummy

9.  Update dummy.  Note that it installs the higher versioned, i686 package,
    even though x86_64 might be specified.

	yum update dummy.x86_64

Actual results:
Yum upgrades to dummy-1-2.i686.rpm, honoring the version number over the architecture.


Expected results:
	Yum, with the directives configured, would either generate an error or simply 
	not update the package since the $arch is different.
	dummy-1-1.x86_64.rpm would remain installed.


Additional info:

Comment 1 Terry Bowling 2016-07-29 13:51:43 UTC
Created attachment 1185564 [details]
dummy-1-1.x86_64.rpm

Comment 2 Terry Bowling 2016-07-29 13:52:22 UTC
Created attachment 1185565 [details]
dummy-1-2.i686.rpm

Comment 3 Terry Bowling 2016-07-29 13:54:13 UTC
Created attachment 1185566 [details]
testrepo.repo

Comment 4 Terry Bowling 2016-11-16 15:51:14 UTC
Note the follow BZs are possibly somewhat related, all involving the upgrades and new i686 (32 bit) version of OpenJDK.

bz1395397 - Bug: In-place upgrade installs wrong version of OpenJDK
bz1388520 - installing java-1.8.0-openjdk.i686 installs incorrect x86_64 dependencies
bz1361609 - Yum changes arch of package if repository becomes out of sync with 32bit OpenJDK

Comment 12 Valentina Mukhamedzhanova 2017-03-15 14:31:25 UTC
*** Bug 1428716 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2018-04-10 15:05:56 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/RHBA-2018:0845


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