I have a server that should contain all the RPM packages downloaded from CentOS repository so that I can reach that server from another server which hasn't got internet access and get the up to date packages to itself.
The thing is that, because of dependency issue, I can't download all of the packages. Below there are the commands that I tried.
$ repotrack -p . -a x86_64 *.rpm
Above command downloads 194 RPM packages. When I try with *rpm, again the same result.
$ yum install --downloadonly --installroot=/etc/yum.downloads/packets-installroot --downloaddir=/etc/yum.downloads *.rpm
Above command downloads 179 RPM packages. When I try with *rpm, the packet count decreased.
$ yumdownloader --resolve --destdir=/etc/yum.downloads/ *.rpm
Above command downloads just 48 packages.
$ yum install --downloadonly --downloaddir=/etc/yum.downloads/ *rpm
Above command downloads just 48 packages.
These commands should download all RPM packages and dependencies whereas they don't. I'm trying the commands with specific 1 package also and they download its dependencies but whenever I try to download all packages, it fails to do that I guess.
UPDATE:
I tried below command
$ repoquery --qf=%{name} -g --list --grouppkgs=all [groups] | xargs repotrack -a x86_64 -p .
It downloaded 4640 packages but still there is a problem. -g commands query groups instead of packages. So there are packages that hasn't got groups and I need to download them as well.
-a
parameter is the solution to that I believe because in the manual it says that -a
"query all". But still I couldn't find the true syntax for that. Does anybody know?