Re: RPMbuild mystery parameters "--with" and "--without"

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

 



On 01/20/2014 05:56 PM, Richard W.M. Jones wrote:
On Mon, Jan 20, 2014 at 03:24:12PM +0100, Björn Persson wrote:
Apparently RPMbuild has a pair of parameters "--with" and "--without"
that can supposedly enable and disable optional features in a package.
Has anyone seen any documentation that explains how those work and how
they interact with a spec file?

I want to be able to easily switch an option between these two states:
· off by default but can be enabled with "--with"
· on by default but can be disabled with "--without"
What's a good way to code that in the spec?

They are (IMHO) very confusing to implement.  However have a look at a
the libvirt spec file for a working example:

   http://pkgs.fedoraproject.org/cgit/libvirt.git/tree/libvirt.spec

The confusion with bcond comes from the fact the logic seems entirely backwards. Which it kinda is, until one learns the logic behind it:

"%bcond_with foo" adds support for "--with foo" build option to the spec. Which also happens to mean that the default is "without" - why else would you need a --with option? And conversely, "%bcond_without foo" adss "--without foo" build option, effectively also saying default is "with".

The fact that *everybody* is (at least initially) confused about it says something about the intuitiveness of the feature ... or lack of thereof :)

	- Panu -

--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[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