I setup a private repository (local mount for now) and built custom rpms. The idea is to build the rpm, add it to the repo, and trigger a yum update mypackage
to several servers.
The problem I'm having is that the newer version of the rpm does not show up... and the old version of the rpm still does, even after I delete it from the repo.
I've tried yum update
and yum clean all
but it does not get the latest data in my local repo.
When I uninstall the package, and re-install it, it tries to install the old rpm that is no longer present, and fails.
What is the process to update the repo data so I can run updates immediately?
** update **
As I was writing this, I thought to try createrepo .
after I updated the rpms. This allowed me to install the latest version.
Is this what I should run after updating the files?
Fge's comment is correct. Every time you add a new rpm to a repository you must run createrepo. Otherwise the repo metadata doesn't get updated so it still sees the previous RPM as the latest version.
Edit: The docs that I linked to that explained the same steps as the answer below by Steve Goodman were removed for some reason, check out that answer instead (https://stackoverflow.com/a/18604484/1263015)