Red Hat Bugzilla – Bug 317761
No way to disable 'use_cache'
Last modified: 2013-01-09 23:26:36 EST
Description of problem:
Mock set a default config of:
config_opts['use_cache'] = True
However, the command line option only has the capability of turning 'use_cache' on:
parser.add_option("--autocache", action ="store_true", dest="use_cache",
default=False, help="Turn on build-root caching")
If the default were to be False (like 'rebuild_cache') this would be fine.
However, because the default is True... 'use_cache' is always enabled.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. use mock
chroots are always cached.
chroots should only be cached when --autocache is added at command line.
Another method would be to add a switch for '--nocache' that would disable both
'use_cache' and 'rebuild_cache'.
Created attachment 215411 [details]
Patch to disable default caching (keeping cli options intact)
Created attachment 215421 [details]
Patch to keep use_cache by default, but changes --autocache to --nocache
Created attachment 215441 [details]
Modification to 0.7.6 spec file to add nocache_option patch
BJ, the caching logic underwent a *huge* set of modifications in the great
rewrite. Would you please look at how caching is done now (using a set of
plugins) and see if what we have meets your needs?
We've actually improved caching behavior quite a bit and have changed command
line options quite drastically. The only way to turn off caching now is to use a
config option in /etc/mock/site-defaults.cfg (or in a specific root configuration).
Thank you Clark... everything looks pretty squared away with caching as of 0.8.X.
wish I could take credit, but Michael did all the heavy lifting on the caching