Red Hat Bugzilla – Bug 647219
Man Pages for yum and rpm Do Not Mention /etc/rpm/platform
Last modified: 2014-01-21 01:19:40 EST
The /etc/rpm/platform file, which is not listed in the yum man page, controls the ability to download and list - using yum or yumdownloader (in the yum-utils package) - rpm files not associated with the platform running the yum command. For example if one wants to download x86_64 rpm files on an i686 machine, the only way to do so is to change the /etc/rpm/platform content from "i686" to "x86_64".
Users need to be aware of the /etc/rpm/platform file. At a minimum this file should be listed in the files section of the man pages. Better yet there should be a brief mention that /etc/rpm/platform must be modified for cross-platform downloads. When reading the documentation one gets the impression that changing the exactarch parameter value on the yum.conf man page will do the trick but that is not the case.
Found using yum.noarch 3.2.22-20.el5.centos and yum-utils.noarch (which contains yumdownloader) 1.1.16-14.el5.centos.1.
That file is strictly legacy, it _can_ be used to tweak the arch. setting Eg. from i686 to athlon etc. but that's an implementation detail of anaconda/rpm/yum/etc. ... we don't document the random set of /proc files we also look at and changing it by hand is, being nice, unsupported.
Completely changing it from i686 to x86_64 is pretty crazy, I've not heard of anybody doing that and I know it can't work with RHN.
The /etc/rpm/platform file may be legacy but it is still used by yum when deciding which repositories to search. Try it and you will see.
I'm not suggesting that you support changing /etc/rpm/platform manually. I AM suggesting that you correct your documentation to mention the file because it IS still consulted by the yum code and used by the algorithm.
As to the reason for editing /etc/rpm/platform, there are cases where a machine of one type (platform) is used to query repositories to determine what rpm files will be used by another platform.
I know it's "used", but as I said we do significantly more than just look at uname -a to work out $arch/$basearch ... documenting all of that would likely not be more useful than what we have now.
For querying use: repoquery --archlist (although, again, this won't work with RHN).