I am trying to use yum to install packages onto a CompactFlash? disk that will then be installed in a small computer. I want to mount the CF disk at /mnt and then use the --installroot to install packages onto the disk. What I have found is that the --installroot option also affects where yum expects its cache to be. This means that yum fails because /mnt/var/cache/yum does not exist:
Error: Cannot retrieve repository metadata (repomd.xml) for repository: updates-newkey. Please verify its path and try again
I don't want to actually install yum on the CF disk. I just want to use yum on the hosting computer to install packages on a temporarily mounted flash disk (i.e., /mnt is root, but real /var/cache/yum is used).
Could yum be modified to provide this feature?
I find that yumdownload behaves in a similar manner.