ref-manual: Edits to the license flag matching section.
Partial edits. (From yocto-docs rev: 32c1d40eff9a3e27d5ec09bde57e2c344bb2ded9) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
4b1833f881
commit
30cdf93d0c
|
@ -902,48 +902,60 @@
|
||||||
<title>License Flag Matching</title>
|
<title>License Flag Matching</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The definition of "matching" in reference to a
|
In general, license flag matching is simple.
|
||||||
recipe's <filename>LICENSE_FLAGS</filename> setting is simple.
|
However, understanding some concepts will help you
|
||||||
However, some things exist that you should know about in order to
|
correctly and effectively use matching.
|
||||||
correctly and effectively use it.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Before a flag
|
Before a flag
|
||||||
defined by a particular recipe is tested against the
|
defined by a particular recipe is tested against the
|
||||||
contents of the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, the
|
contents of the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, the
|
||||||
string <filename>_${PN}</filename> (with
|
expanded string <filename>_${PN}</filename> is
|
||||||
<link linkend='var-PN'><filename>PN</filename></link> expanded of course) is
|
appended to the flag.
|
||||||
appended to the flag, thus automatically making each
|
This expansion makes each <filename>LICENSE_FLAGS</filename>
|
||||||
<filename>LICENSE_FLAGS</filename> value recipe-specific.
|
value recipe-specific.
|
||||||
That string is
|
After expansion, the string is then matched against the
|
||||||
then matched against the whitelist.
|
whitelist.
|
||||||
So if you specify <filename>LICENSE_FLAGS = "commercial"</filename> in recipe
|
Thus, specifying <filename>LICENSE_FLAGS = "commercial"</filename>
|
||||||
"foo" for example, the string <filename>"commercial_foo"</filename>
|
in recipe "foo" for example, results in the string
|
||||||
would normally be what is specified in the whitelist in order for it to
|
<filename>"commercial_foo"</filename>.
|
||||||
match.
|
And that string would normally be appears in the whitelist
|
||||||
|
in order for a match to occur.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can broaden the match by
|
Judicious use of the <filename>LICENSE_FLAGS</filename>
|
||||||
putting any "_"-separated beginning subset of a
|
strings and the contents of the
|
||||||
<filename>LICENSE_FLAGS</filename> flag in the whitelist, which will also
|
<filename>LICENSE_FLAGS_WHITELIST</filename> variable
|
||||||
match.
|
allows you a lot of flexibility for matching license
|
||||||
For example, simply specifying "commercial" in
|
flags.
|
||||||
the whitelist would match any expanded <filename>LICENSE_FLAGS</filename>
|
For example, you can broaden the matching capabilities by
|
||||||
definition starting with "commercial" such as
|
using string subsets from the <filename>LICENSE_FLAGS</filename>
|
||||||
"commercial_foo" and "commercial_bar", which are the
|
variables in the whitelist.
|
||||||
strings that would be automatically generated for
|
<note>Be sure to use the part of the expanded
|
||||||
hypothetical "foo" and "bar" recipes assuming those
|
string that precedes
|
||||||
recipes had simply specified the following:
|
the underscore character (e.g.
|
||||||
|
<filename>usethispart_1.3</filename>,
|
||||||
|
<filename>usethispart_1.4</filename>, and so forth).
|
||||||
|
</note>
|
||||||
|
For example, simply specifying the string "commercial" in
|
||||||
|
the whitelist matches any expanded
|
||||||
|
<filename>LICENSE_FLAGS</filename> definition that starts with
|
||||||
|
the string "commercial" such as "commercial_foo" and
|
||||||
|
"commercial_bar", which are the strings the build system
|
||||||
|
automatically generates for hypothetical recipes named
|
||||||
|
"foo" and "bar" assuming those recipes simply specify the
|
||||||
|
following:
|
||||||
<literallayout class='monospaced'>
|
<literallayout class='monospaced'>
|
||||||
LICENSE_FLAGS = "commercial"
|
LICENSE_FLAGS = "commercial"
|
||||||
</literallayout>
|
</literallayout>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Broadening the match allows for a range of specificity for the items
|
Judicious use of the strings with the
|
||||||
in the whitelist, from more general to perfectly
|
<filename>LICENSE_FLAGS</filename> variable and the Broadening the match allows for a range of specificity for the
|
||||||
|
items in the whitelist, from more general to perfectly
|
||||||
specific.
|
specific.
|
||||||
So you have the choice of exhaustively
|
So you have the choice of exhaustively
|
||||||
enumerating each license flag in the whitelist to
|
enumerating each license flag in the whitelist to
|
||||||
|
|
Loading…
Reference in New Issue