1

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

  1. 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

  2. createrepo in that directory and configure the local repository with a file in /etc/yum.repos.d

  3. create a target downloads directory, and also an empty dummy install directiry so that yumdownloader fetches everything.

  4. 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.)

  • Are you following hand-written directions? I would expect to have seen releasever=7, not releasever=/. – Michael Hampton Sep 24 '19 at 10:37
  • I think I cut and pasted from an answer, but I will check to see whether it makes a difference. I doubt it's material because the command works as I show it when run after the "yum install ThePackage". – djna Sep 25 '19 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.