Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 486555 - Need to be able to clean/disable yum cache
Summary: Need to be able to clean/disable yum cache
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-20 09:49 UTC by Richard W.M. Jones
Modified: 2013-01-10 05:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-03 22:44:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2009-02-20 09:49:55 UTC
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
expired.

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
the repository.

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):

0.9.14

How reproducible:

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

Comment 1 Richard W.M. Jones 2009-02-20 10:09:48 UTC
There seems to be a second cache here:
/var/cache/mock/*/yum_cache/
Different from the first one, also needs to be rm -rf'd

Comment 2 Clark Williams 2009-02-20 15:00:40 UTC
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.

Comment 3 Clark Williams 2010-08-03 22:20:48 UTC
mock-1.1.3 coming out with --scrub option which allows you to clean the yum cache.

Comment 4 Fedora Update System 2010-08-07 23:23:38 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.