Bug 277281 - Comments on configuring .rpmmacros in mock config are incorrect (?)
Summary: Comments on configuring .rpmmacros in mock config are incorrect (?)
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Hosted Projects
Classification: Retired
Component: mock
Version: unspecified
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Clark Williams
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-04 20:02 UTC by Todd Zullinger
Modified: 2013-01-10 04:24 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2008-03-07 21:29:51 UTC


Attachments (Terms of Use)

Description Todd Zullinger 2007-09-04 20:02:22 UTC
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 21:29:51 UTC
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.