176 lines
4.2 KiB
HTML
176 lines
4.2 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of Dpkg::BuildOptions</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>Dpkg::BuildOptions</H1>
|
||
Section: libdpkg-perl (3perl)<BR>Updated: 2020-03-23<BR><A HREF="#index">Index</A>
|
||
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<A NAME="lbAB"> </A>
|
||
<H2>NAME</H2>
|
||
|
||
Dpkg::BuildOptions - parse and update build options
|
||
<A NAME="lbAC"> </A>
|
||
<H2>DESCRIPTION</H2>
|
||
|
||
|
||
|
||
The Dpkg::BuildOptions object can be used to manipulate options stored
|
||
in environment variables like <FONT SIZE="-1">DEB_BUILD_OPTIONS</FONT> and
|
||
<FONT SIZE="-1">DEB_BUILD_MAINT_OPTIONS.</FONT>
|
||
<A NAME="lbAD"> </A>
|
||
<H2>METHODS</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">$bo = Dpkg::BuildOptions->new(%opts)<DD>
|
||
|
||
|
||
|
||
|
||
Create a new Dpkg::BuildOptions object. It will be initialized based
|
||
on the value of the environment variable named <TT>$opts</TT>{envvar} (or
|
||
<FONT SIZE="-1">DEB_BUILD_OPTIONS</FONT> if that option is not set).
|
||
<DT id="2">$bo-><B>reset()</B><DD>
|
||
|
||
|
||
|
||
|
||
Reset the object to not have any option (it's empty).
|
||
<DT id="3">$bo->merge($content, $source)<DD>
|
||
|
||
|
||
|
||
|
||
Merge the options set in <TT>$content</TT> and record that they come from the
|
||
source <TT>$source</TT>. <TT>$source</TT> is mainly used in warning messages currently
|
||
to indicate where invalid options have been detected.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
<TT>$content</TT> is a space separated list of options with optional assigned
|
||
values like ``nocheck parallel=2''.
|
||
<DT id="4">$bo->set($option, $value, [$source])<DD>
|
||
|
||
|
||
|
||
|
||
Store the given option in the object with the given value. It's legitimate
|
||
for a value to be undefined if the option is a simple boolean (its
|
||
presence means true, its absence means false). The <TT>$source</TT> is optional
|
||
and indicates where the option comes from.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
The known options have their values checked for sanity. Options without
|
||
values have their value removed and options with invalid values are
|
||
discarded.
|
||
<DT id="5">$bo->get($option)<DD>
|
||
|
||
|
||
|
||
|
||
Return the value associated to the option. It might be undef even if the
|
||
option exists. You might want to check with <TT>$bo</TT>->has($option) to verify if
|
||
the option is stored in the object.
|
||
<DT id="6">$bo->has($option)<DD>
|
||
|
||
|
||
|
||
|
||
Returns a boolean indicating whether the option is stored in the object.
|
||
<DT id="7">$bo->parse_features($option, $use_feature)<DD>
|
||
|
||
|
||
|
||
|
||
Parse the <TT>$option</TT> values, as a set of known features to enable or disable,
|
||
as specified in the <TT>$use_feature</TT> hash reference.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Each feature is prefixed with a ‘<B>+</B>’ or a ‘<B>-</B>’ character as a marker
|
||
to enable or disable it. The special feature “<B>all</B>” can be used to act
|
||
on all known features.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Unknown or malformed features will emit warnings.
|
||
<DT id="8">$string = $bo->output($fh)<DD>
|
||
|
||
|
||
|
||
|
||
Return a string representation of the build options suitable to be
|
||
assigned to an environment variable. Can optionally output that string to
|
||
the given filehandle.
|
||
<DT id="9">$bo->export([$var])<DD>
|
||
|
||
|
||
|
||
|
||
Export the build options to the given environment variable. If omitted,
|
||
the environment variable defined at creation time is assumed. The value
|
||
set to the variable is also returned.
|
||
</DL>
|
||
<A NAME="lbAE"> </A>
|
||
<H2>CHANGES</H2>
|
||
|
||
|
||
|
||
<A NAME="lbAF"> </A>
|
||
<H3>Version 1.02 (dpkg 1.18.19)</H3>
|
||
|
||
|
||
|
||
New method: <TT>$bo</TT>-><B>parse_features()</B>.
|
||
<A NAME="lbAG"> </A>
|
||
<H3>Version 1.01 (dpkg 1.16.1)</H3>
|
||
|
||
|
||
|
||
Enable to use another environment variable instead of <FONT SIZE="-1">DEB_BUILD_OPTIONS.</FONT>
|
||
Thus add support for the ``envvar'' option at creation time.
|
||
<A NAME="lbAH"> </A>
|
||
<H3>Version 1.00 (dpkg 1.15.6)</H3>
|
||
|
||
|
||
|
||
Mark the module as public.
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="10"><A HREF="#lbAB">NAME</A><DD>
|
||
<DT id="11"><A HREF="#lbAC">DESCRIPTION</A><DD>
|
||
<DT id="12"><A HREF="#lbAD">METHODS</A><DD>
|
||
<DT id="13"><A HREF="#lbAE">CHANGES</A><DD>
|
||
<DL>
|
||
<DT id="14"><A HREF="#lbAF">Version 1.02 (dpkg 1.18.19)</A><DD>
|
||
<DT id="15"><A HREF="#lbAG">Version 1.01 (dpkg 1.16.1)</A><DD>
|
||
<DT id="16"><A HREF="#lbAH">Version 1.00 (dpkg 1.15.6)</A><DD>
|
||
</DL>
|
||
</DL>
|
||
<HR>
|
||
This document was created by
|
||
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
||
using the manual pages.<BR>
|
||
Time: 00:05:38 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|