Bug 209407 - mock doesn't honour use_cache in a config file
Summary: mock doesn't honour use_cache in a config file
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-05 09:11 UTC by Matthew Booth
Modified: 2013-01-10 04:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-11-21 20:21:12 UTC
Embargoed:


Attachments (Terms of Use)

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. 



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