Having CentOS 6.3 installed on x86_64.
Below I'll demonstrate my problem using parted package.
Running:
yumdownloader --destdir=001 --assumeyes --resolve parted
As a result downloaded the following rpms are:
ls -1 001/
device-mapper-libs-1.02.74-10.el6_3.3.i686.rpm
libblkid-2.17.2-12.7.el6_3.i686.rpm
libselinux-2.0.94-5.3.el6.i686.rpm
libsepol-2.0.41-4.el6.i686.rpm
libudev-147-2.42.el6.i686.rpm
libuuid-2.17.2-12.7.el6_3.i686.rpm
ncurses-libs-5.7-3.20090208.el6.i686.rpm
parted-2.1-18.el6.i686.rpm
parted-2.1-18.el6.x86_64.rpm
readline-6.0-4.el6.i686.rpm
If I examine dependency of x86_64 version of parted I see:
rpm -qp --requires 001/parted-2.1-18.el6.x86_64.rpm
/bin/sh
...
libblkid.so.1()(64bit)
libblkid.so.1(BLKID_2.15)(64bit)
libblkid.so.1(BLKID_2.17)(64bit)
...
Therefore, I expect x86_64 version of libblkid
to be downloaded too.
So, how both i686 and x86_64 version of parted
downloaded, but resolved rpms are only only i686?
Best Answer
The
yumdownloader --resolve
command does not always download even the first layer of the required packages, let alone the recursive dependencies. Therepoquery
command does a better job of determining the required packages even though it too has a recursion limit.To solve the problem where yumdownloader downloads only i686 resolved rpms, use the
repoquery --requires --recursive
command to obtain the list of required packages and pipe that list to theyumdownloader
command to download the packages. For example, to download theparted
package and its first layer of dependencies:On my RHEL 6.4 system, the above command downloaded the i686 (where applicable) and the x86_64 versions of the required packages:
While this is a good start, the absence of the glibc-common package indicates that the list of downloaded packages is still incomplete. To download a more complete list of the required packages takes a set of commands that invokes repoquery twice as done here:
The packages downloaded by this command includes glibc-common and several others that we missed the first time:
This is probably a lot more packages than you need, but it is a more complete set and includes the 64-bit packages you expected.