Red Hat Bugzilla – Bug 486555
Need to be able to clean/disable yum cache
Last modified: 2013-01-10 00:04:10 EST
Description of problem:
Mock (and yum in general) has an annoying habit of caching repository state,
and not doing a trivial 'HTTP HEAD' request to find out if its cache needs to be
This is particularly a problem for smock because we rerun 'createrepo' between
each run of mock, but the yum inside the mock keeps getting the old state of
It appears that the cache is stored in /var/lib/mock/cache/.../yum_cache/
Unfortunately it is owned by root and so a simple 'rm -r' fails for us.
Therefore we need a mock command to blow away this cache. For smock it
is not useful since the webserver runs on localhost so it's just as easy to fetch
the repodata and RPMs each time.
Version-Release number of selected component (if applicable):
About 50% of the time.
Steps to Reproduce:
1. Run mock
2. Run createrepo on some repo used by mock
3. Run mock again
4. Observe that sometimes old repodata is used
There seems to be a second cache here:
Different from the first one, also needs to be rm -rf'd
mock 0.9.14 changed the mock cache directory from /var/lib/mock/cache to /var/cache/mock. The /var/lib/mock/cache dir needs to be whacked entirely.
I'm not sure what mock can do about the repodata. We use yum for any access to repositories.
mock-1.1.3 coming out with --scrub option which allows you to clean the yum cache.
mock-1.1.3-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.