1

I have tried everything here but I'm stumped. I'm trying to use the downloadonly plugin for yum to download some RPMs and their dependencies but not install them. After installing the plugin, I will run the following command:

yum install --downloadonly --downloaddir=/rpms/ zlib.i686

It goes through the normal yum process, and then says "exiting because --downloadonly specified" after the Downloading packages part.

However, I can't find where the heck the packages get downloaded to! When I specify the download directory, it actually creates the folder if it doesn't exist, but then I go into the packages subfolder and there's nothing displayed.

I have tried editing the keepcache=1 in the yum.conf file, and then just not specifying the download directory, but it does the same thing.

Thoughts?

I have tried both of the suggestions in here (because I am really after downloading the RPMs and all of their dependencies) Download all dependencies with yumdownloader, even if already installed?

Still nothing.

CentOS6.5 btw.

  • What happens if you omit the --downloaddir option? Does it download to your current location? – Timothy Martin Nov 13 '15 at 21:34
  • It supposedly downloads to the default cache location folder, but when I go to that folder I find nothing downloaded. – Lonememe Nov 13 '15 at 21:45
  • Dang...I guess I've stumped everyone. I still haven't had any luck finding where they are downloading too, or if they're even downloading at all.

    If it helps diagnose it, I'm logged in as root. It's on a VM, but that shouldn't make a huge difference as far as I can tell.

    – Lonememe Nov 16 '15 at 16:06
  • Could you give this a try? strace yum install --downloadonly zlib.i686 2> /tmp/yumdownload.txt. Once the yum command is complete, search the /tmp/yumdownload.txt file for the download location (e.g. grep "^stat.*\.rpm" /tmp/yumdownload.txt). – Timothy Martin Nov 16 '15 at 18:02
  • That's a handy utility! So, I ran the strace install and searched the log file for rpms. I found a lot of entries like this" – Lonememe Nov 16 '15 at 23:37
  • Ugh this comment editor... That's a handy utility! So, I ran the strace install and searched the log file for rpms. I found a lot of entries like this stat("/var/cache/yum/x86_64/6/local/packages/zlib-1.2.3-29.el6.i686.rpm", 0x7fff98bc1540) = -1 ENOENT (No such file or directory) I looked in the directory referenced, and yes, sure enough, there are no packages. However, I did also find a few interesting entires further down in this log file... stat("/opt/mnt/yum/Packages/glibc-2.12-1.132.el6.i686.rpm", {st_mode=S_IFREG|0644, st_size=4549088, ...}) = 0 – Lonememe Nov 16 '15 at 23:45
  • The rest of my comment: In the /opt/mnt etc folder, I found the RPMs I think. The two subfolders in the mnt folder had gray padlock icons, so I'm not sure if there's some permissions issue going on here that's preventing the downloadonly plugin from working right. Thoughts?

    ...and the RPMs in the /opt/mnt/yum folders disappear after a restart apparently. Frustrating.

    – Lonememe Nov 16 '15 at 23:46

1 Answers1

2

Judging by the name of the path were you did find the rpms, I'm inclined to assume that that is where the repository (repodata) is/was as opposed to where they have accidentally been downloaded to. Your comment about grey padlocks further suggests that this was a locally mounted readonly device.

I'm going through the same pain and I'm about to conclude that the downloadonly options in yum will not download the rpms, if the baseurl in the repo file in /etc/yum.repos.d has a value of file:///some/path.

When I move the local repository to an apache server, the download option works swimmingly.

There is an alternative, called yumdownloader in yum-utils, that could serve you well.

techraf
  • 5,941