yumdownloader vs repotrack

I'm working on CentOS 6.3.

Recently I come across repotrack from yum-utils.

yumdownloader --resolve and repotrack looks very similar, but it looks like yumdownloader download only part of dependencies, where repotrack all dependencies.

Just try

yumdownloader --destdir=/tmp/download --assumeyes --resolve parted

versus

repotrack parted

What is the difference between yumdownloader --resolve and repotrack?


Solution 1:

yumdownloader --resolve is suppose to resolve all dependencies and download the packages

repotrack parted also resolves dependencies and downloads them

My guess is that repotrack is downloading all the dependencies for any architecture since it doesn't appear you specified the architecture which could account for the difference in what you see downloaded.

I believe you use the repotrack -a switch to specify your architecture

Solution 2:

Keep in mind, that yumdownloader will use your yum database when resolving dependencies.

For example if you download bash, which needs glibc, it will resolve glibc and skip it, since it is installed. If you want to download all dependencies, use a different installroot instead.

It downloads all the dependencies:

yumdownloader --installroot=/tmp/empty-directory --resolve bash

Solution 3:

Repotrack downloads ALL POSSIBLE dependencies of your package - dozens or hundreds. Usually the only coherent way of locally installing these is a local repo.

Yumdownloader --resolve downloads the actual dependencies you need, plus all first level dependencies, even if you don't need them. Its a little odd in that sense, but sometimes useful.

Yum --downloadonly downloads the actual dependencies you need for that particular box. This makes it easy to install *.rpm.

Both yumdownloader and yum --downloadonly are (by-design) sensitive to the existence of already-installed packages, and should be run before any packages or their dependencies are installed.

Solution 4:

yumdownloader [options] package1 [package2...] http://linux.die.net/man/1/yumdownloader This seems to download the packages and their primary dependencies. What it does not do is download the dependencies of the dependencies. It Only downloads the top level dependencies of the package.

repotrack [options] package1 [package2...] http://man7.org/linux/man-pages/man1/repotrack.1.html This downloads the packages and all of their dependencies along with the sub-level dependencies that are needed.

The latter option is a lot better for acquiring every dependency you will need for populating your own single-source repository.