Issue
I'm using CentOS 7 64bit. I'm trying to download multiple packages with their dependencies using yumdownloader
. However I'm facing the problem that packages that I do not need are getting downloaded.
When I'm installing a package using yum install <package>
only one package is getting installed: either x86_x64
(if available), or i686
(if 64bit is not available) or noarch
. I'm trying to mimic the same behavior to download only the best matching packages with yumdownloader
. However this does not work as expected and both x86_x64
and i686
are getting downloaded for packages that have 2 architectures available. Adding --archlist=x86_64
does not make any difference. Setting multilib_policy=best
in a config file does not make any difference either.
I also checked repoquery
tool. If I set --archlist=x86_64
then only x86_64
packags would be listed. Those that have only i686
or noarch
versions will not be picked up. If I set --archlist=x86_64,i686,noarch
then the result is similar to yumdownloader
, i.e. multiple architectures are being picked up.
Is there a way to list or download only best matching package?
The only option I see is to do it completely manually - prepare lists using repoquery
and remove duplicates. But I would prefer to find more neat and robust approach.
Solution
What you can do, is use the standard yum
option for excluding packages. It is "inherited" by yumdownloader
.
Example:
yumdownloader libX11 --archlist=x86_64 --exclude="*.i686"
Note that i686 is sort of "subset" to x86_64 due to multilib, and especially applies to libraries (nearly all have i686 equivalent). Make sure you won't have any software that actually requires i686 libraries later on... The only notable example of such i686-only software I've seen is steam.i686 (there is simply no x86_64 version), but then again who plays that on RHEL? (aside from myself).
Answered By - Danila Vershinin Answer Checked By - Clifford M. (WPSolving Volunteer)