How do I get yum to see updates to a local repo without cleaning cache?

Posted by Matt on Super User See other posts from Super User or by Matt
Published on 2011-09-08T22:12:21Z Indexed on 2014/05/30 21:38 UTC
Read the original article Hit count: 173

Filed under:
|
|

I have set up a local yum repository which I use to install test builds. For the testing purposes, my packages are versioned by <svn version number>.<date>.<time> (e.g. 12345.20110908.150404

The trouble is, once I make a new RPM, copy it to the repository directory and run createrepo $REPO_DIR, yum does not see the new RPM as being available.

$ cd $REPO_DIR
$ ls -1
repodata
package-12345.20110908.150404-1.x86_64.rpm
package-12345.20110908.174329-1.x86_64.rpm

$ createrepo .
# ...snip...

$ rpm -q package
package-12345.20110908.150404-1.x86_64

$ yum list --showduplicates package
Installed Packages
package.x86_64    12345.20110908.150404-1    @repo
Available Packages
package.x86_64    12345.20110908.150404-1    repo

I can see the updates and grab them if I run yum clean all and then re-fetch the metadata, but I think this just means I need to be doing something else from the repo, as I don't have to do that for other yum repos.

How do I need to set up my local repository so that I only need to run yum update from the client without having to clean my yum cache?

© Super User or respective owner

Related posts about rpm

Related posts about yum