Red Hat Bugzilla – Bug 140339
aliases with hyphens get an extra space injected (e.g. --with/--without)
Last modified: 2007-11-30 17:10:55 EST
Description of problem:
rpm popt aliases with hyphens like
become a space includimng macro like (from %dump)
-8: _with_alsa -devices --with-alsa-device
Version-Release number of selected component (if applicable):
Call rpmbuild with "--with alsa-devices"
Steps to Reproduce:
1.Create a plain specfile with %dump in its %prep
2.rpmbuild --with alsa-devices dummy.spec
3.Watch the macro definitions in the output
A macro called "_with_alsa devices" is created.
The macros should be called "with_alsa-devices"
Workaround by changing option names not to contain hyphens.
Don't use hyphens.
Reopening, if you don't want to fix it, you should document it
somewhere (at the very least in /usr/share/doc/rpm-*/conditionalbuilds).
"Popt has other meanings for hyphens that cannot be ever
be changed. Don't use hyphens if attempting to use --with
or --without to pass build options into spec files."