Bug 317761 - No way to disable 'use_cache'
No way to disable 'use_cache'
Status: CLOSED CURRENTRELEASE
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-04 00:11 EDT by BJ Dierkes
Modified: 2013-01-09 23:26 EST (History)
2 users (show)

See Also:
Fixed In Version: 0.8.x
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-17 13:31:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to disable default caching (keeping cli options intact) (472 bytes, patch)
2007-10-04 00:35 EDT, BJ Dierkes
no flags Details | Diff
Patch to keep use_cache by default, but changes --autocache to --nocache (1.53 KB, patch)
2007-10-04 00:36 EDT, BJ Dierkes
no flags Details | Diff
Modification to 0.7.6 spec file to add nocache_option patch (1006 bytes, patch)
2007-10-04 00:37 EDT, BJ Dierkes
no flags Details | Diff

  None (edit)
Description BJ Dierkes 2007-10-04 00:11:51 EDT
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):

0.7.6



How reproducible:

Always


Steps to Reproduce:
1. use mock

  
Actual results:

chroots are always cached.


Expected results:

chroots should only be cached when --autocache is added at command line.


Additional info:

Another method would be to add a switch for '--nocache' that would disable both
'use_cache' and 'rebuild_cache'.
Comment 1 BJ Dierkes 2007-10-04 00:35:55 EDT
Created attachment 215411 [details]
Patch to disable default caching (keeping cli options intact)
Comment 2 BJ Dierkes 2007-10-04 00:36:55 EDT
Created attachment 215421 [details]
Patch to keep use_cache by default, but changes --autocache to --nocache
Comment 3 BJ Dierkes 2007-10-04 00:37:31 EDT
Created attachment 215441 [details]
Modification to 0.7.6 spec file to add nocache_option patch
Comment 4 Clark Williams 2008-03-07 16:41:42 EST
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). 

Clark
Comment 5 BJ Dierkes 2008-03-17 13:31:05 EDT
Thank you Clark... everything looks pretty squared away with caching as of 0.8.X.
Comment 6 Clark Williams 2008-03-17 13:57:15 EDT
wish I could take credit, but Michael did all the heavy lifting on the caching
issue. 

Closing

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