My objective is to build a repository so that I can install a package on a machine with no internet connectivity. I use yumdownloader to pull down the package and its dependencies, and it appears to work but gives an error message upon completion. I want to either know that I can safely ignore the error message or better still avoid getting the error message, which is:
Package does not match intended download
The steps I take
Create a local repository for the packages I build myself. For example in a directory rpmbuild/RPMS/noarch I have rpms like this (version numbers removed for clarity)
ThePackage.rpm Dependency1.rpm Dependency2.rpm
createrepo in that directory and configure the local repository with a file in /etc/yum.repos.d
create a target downloads directory, and also an empty dummy install directiry so that yumdownloader fetches everything.
specify the command (releasever=/ seems to be a known workaround to a yum bug)
yumdownloader --releasever=/ --installroot=/dummy --resolve --destdir=/target ThePackage
This works as expected ThePackage, its immediate dependencies from the local repository and all the dependencies from the standard repositories are downloaded. However at the end I get an error message:
file:///home/me/rpmbuild/RPMS/noarch/ThePackage-5.0.0-4.el7.noarch.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=Unity5-build clean metadata
Now of course I've tried that suggested yum clean command, and variations such as clean all. I've zapped the yum cache. Still the same error.
The one thing that does seem to clear the problem is to actually install ThePackage first, then the download works without complaint. This surely implies that some state somewhere needs to be cleared, how can I do that?
yum install ThePackage
However I surely should not need to do this (and I don't want to do it as I'm doing all this in a CI workstream and don't want the full installation overhead.)
0 Answers