Re: %bcond_with is backwards?

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

 



On Thu, Dec 08, 2011 at 12:14:05PM -0800, Adam Williamson wrote:
> On Thu, 2011-12-08 at 20:06 +0000, Richard W.M. Jones wrote:
> > On Thu, Dec 08, 2011 at 07:01:45PM +0000, Paul Howarth wrote:
> > > On Thu, 8 Dec 2011 18:58:29 +0000
> > > "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
> > > 
> > > > On Thu, Dec 08, 2011 at 07:31:58PM +0100, Till Maas wrote:
> > > > > On Thu, Dec 08, 2011 at 06:10:17PM +0000, Richard W.M. Jones wrote:
> > > > > 
> > > > > > # conditionalize Ocaml support
> > > > > > %ifarch sparc64 s390 s390x
> > > > > > %bcond_with ocaml
> > > > > > %else
> > > > > > %bcond_without ocaml
> > > > > > %endif
> > > > > > 
> > > > > > #...
> > > > > > 
> > > > > > %if %{with ocaml}
> > > > > > BuildRequires:  ocaml
> > > > > > BuildRequires:  ocaml-findlib-devel
> > > > > > %endif
> > > > > > 
> > > > > > This code correctly disables OCaml support on architectures where
> > > > > > we don't bother to compile OCaml (sparc64 s390 s390x).  But the
> > > > > > conditional code looks backwards to me.  Does this make sense to
> > > > > > anyone?
> > > > > 
> > > > > It makes sense when you read "%bcond_with ocaml" as 'add a
> > > > > "--with-ocaml" build condition flag' to the spec.
> > > > 
> > > > It does?  Still seems backwards to me.  OCaml is disabled on the
> > > > listed architectures, so that'd be --without-ocaml wouldn't it?
> > > 
> > > Having a build *option* for "--with ocaml" implies that the default
> > > (which is what you get when you build the package in koji) is "without"
> > > ocaml.
> > 
> > I'm sure you're right, but I still genuinely don't understand your
> > explanation :-(
> > 
> > Just to be clear, I'm talking about the %ifarch part above:
> > 
> >   %ifarch sparc64 s390 s390x
> >   %bcond_with ocaml
> >   %else
> >   %bcond_without ocaml
> >   %endif
> > 
> > Why does that disable OCaml support on the architectures sparc64,
> > s390, s390x?
> 
> As I understand Paul's explanation, bcond_with doesn't mean "build with
> this option", it means "create an rpmbuild option which will enable
> building with this option". i.e., "bcond_with ocaml" sets up an
> parameter *for the .src.rpm itself* so that you could do "rpmbuild
> --with-ocaml foobar.src.rpm" on the resultant .src.rpm to build it with
> ocaml support. It does not mean that a *default* build of the .src.rpm
> will be done with ocaml support.

Oh I see now ...

Thanks everyone.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux