Bug 215168 - Mock overrides defaults when command-line options are not set
Mock overrides defaults when command-line options are not set
Status: CLOSED NEXTRELEASE
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Clark Williams
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-11 15:14 EST by Eric Work
Modified: 2013-01-09 23:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-21 15:16:34 EST
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 prevent defaults.cfg settings from being overwritten (903 bytes, patch)
2006-11-11 15:14 EST, Eric Work
no flags Details | Diff

  None (edit)
Description Eric Work 2006-11-11 15:14:39 EST
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 15:14:39 EST
Created attachment 140971 [details]
Patch to prevent defaults.cfg settings from being overwritten
Comment 2 Clark Williams 2006-11-21 15:16:34 EST
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

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