Bug 277281 - Comments on configuring .rpmmacros in mock config are incorrect (?)
Comments on configuring .rpmmacros in mock config are incorrect (?)
Product: Fedora Hosted Projects
Classification: Retired
Component: mock (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Clark Williams
Depends On:
  Show dependency treegraph
Reported: 2007-09-04 16:02 EDT by Todd Zullinger
Modified: 2013-01-09 23:24 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.9.7-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-07 16:29:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Todd Zullinger 2007-09-04 16:02:22 EDT
It seem that the comments in /etc/mock/defaults.cfg for configuring .rpmmacros
are not quite correct.  For mock-0.7.6 the comments read:

## to add new rpmmacros, you need to follow special syntax or mock breaks:
#config_opts['macros'] = config_opts['macros'] + """
#%%_my_special_rpm_macro  value

I set some values this way and the resulting .rpmmacros in the chroot ended up
having the %% included.  I changed the settings to remove one of the percent
signs and rebuilt the chroot cache, and all was well.

Is the syntax listed in the comments only needed if/when you're doing text
replacements (so python doesn't balk at bogus % modifiers)?  Or did I do
something silly and not notice it?
Comment 1 Clark Williams 2008-03-07 16:29:51 EST
Fixed in the great mock rewrite.  I suspect we had some very odd character
substitution going on back then which got straightened out in the redesign. 

The config options is now in /etc/mock/site-defaults.cfg. You specifiy the macro
name as a dictionary key with a value and mock defines the .rpmmacros file for
you, so you don't have to deal with '%' substitution.

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