[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: mock 0.8.9



On Tue, Dec 04, 2007 at 06:27:33PM +0200, Ville Skyttä wrote:
> On Tuesday 04 December 2007, Todd Zullinger wrote:
> > Michael E Brown wrote:
> > > Patches welcome.
> >
> > Here's one.  This adds a --define option, which may be used multiple
> > times.  Usage is pretty much like the rpm --define option:
> >
> > $ mock --define="with_extra_cheese 1" --define="packager Monkey" ...
> 
> That's nice, but even better IMHO would be something that could be used to 
> pass arbitrary options (or at least -D, --define, --with, --without 
> and --target) as-is to rpmbuild, for example everything after a "--", like
> 
> mock rebuild foo.src.rpm -- --define="foo bar" --target=i686 --with 
> foo --without bar --define 'quux baz'

--target is already passed to rpmbuild. Its value depends on
"target_arch" setting in the chroot config file.

file:///usr/share/doc/rpm-4.4.2.2/conditionalbuilds
=====================================
For example, when rpm is invoked as
\verbatim
    rpm ... --with ldap ...
\endverbatim
then the popt aliases will cause the options to be rewritten as
\verbatim
    rpm ... --define "_with_ldap    --with-ldap" ...
\endverbatim
which causes a "%_with_ldap" macro to be defined with value
"--with-ldap"
during a build.
=====================================

So, we could probably easily implement --with{,out} using this code as a
base.

--
Michael


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]