Bug 215168

Summary: Mock overrides defaults when command-line options are not set
Product: [Retired] Fedora Hosted Projects Reporter: Eric Work <work.eric>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dcantrell, extras-qa
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:16:34 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:
Attachments:
Description Flags
Patch to prevent defaults.cfg settings from being overwritten none

Description Eric Work 2006-11-11 20:14:39 UTC
Description:

Flags which can be set from the command-line always override values from
/etc/mock/defaults.cfg even if not present on the command-line.  For example
debug can't be permanently enabled in defaults.cfg as the default flag value is
false (when --debug is not used) and overrides the debug value.  I attached a
patch which checks the value of the flags before overriding value.

Version: mock-0.6.8-4.fc6

Example (autocache):
1. Change /etc/mock/defaults.cfg, set config_opts['use_cache'] = True
2. Run mock w/o --autocache when building a package
  
Actual results:
Doesn't use autocache even though its been enabled in defaults.cfg

Expected results:
Autocache should be enabled by defaults.cfg during a mock build.

Comment 1 Eric Work 2006-11-11 20:14:39 UTC
Created attachment 140971 [details]
Patch to prevent defaults.cfg settings from being overwritten

Comment 2 Clark Williams 2006-11-21 20:16:34 UTC
Applied. Thanks for the patch. Should be fixed in 0.6.9 (next release)

Sorry it took so long, but I wanted to give the entire
defaults+commandline+configs processing a good look before trying to "fix" it.

Clark