Bug 209407

Summary: mock doesn't honour use_cache in a config file
Product: [Retired] Fedora Hosted Projects Reporter: Matthew Booth <mbooth>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dcantrell
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-21 20:21:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Booth 2006-10-05 09:11:45 UTC
Description of problem:
Put the following line in a configuration file:

config_opts['use_cache'] = True

Run 'mock init'

Note that mock didn't use the cache.

My python is very weak, but to my untrained eye it looks like the default value
of False for the --autocache command line option overrides the config file even
when it's not specified.

Version-Release number of selected component (if applicable):
mock-0.6.5-1

Comment 1 Clark Williams 2006-10-05 15:33:04 UTC
I believe you are correct (that the command line option default is overriding
the config file). It may be that we need to default things like this to None, so
that we don't override something that didn't have a command line value. 



Comment 2 Clark Williams 2006-11-21 20:21:12 UTC
modified set_config_opts_per_cmdline() to be more intelligent about overriding
defaults with commandline values.