summaryrefslogtreecommitdiffstats
path: root/documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2018-01-29 15:18:03 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-14 15:25:29 +0000
commitae06e04cd225d2c2147ca355e2dd39b4f6cf6775 (patch)
treec920e85262a91e7626279e7dcbbd56a299919f49 /documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html
parentebc7de094881dd8f2450aa4fdf548f2e9c835df1 (diff)
downloadpoky-ae06e04cd225d2c2147ca355e2dd39b4f6cf6775.tar.gz
documentation: Created new "Getting Started" manual.
Creation involved removing the overview-manual and replacing it with the getting-started manual. All links to the string "&YOCTO_DOCS_OVERVIEW_URL" had to be replaced with "&YOCTO_DOCS_GS_URL" across the entire YP manual set. I renamed files used to create the manual with prefixes suited for the new manual name, which is "Getting Started With Yocto Project". The style sheet for the new manual needed updating to display the new .PNG image for the title page. The mega-manual file had to be updated to include the files. The mega-manual.sed file had to be updated to include the new manual and not use the overview manual. (From yocto-docs rev: 6c7abf9192390121000f577d6c98f259d290d15d) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html')
-rw-r--r--documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html126
1 files changed, 126 insertions, 0 deletions
diff --git a/documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html b/documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html
new file mode 100644
index 0000000000..1e08bafad1
--- /dev/null
+++ b/documentation/getting-started/eclipse/html/getting-started/license-flag-matching.html
@@ -0,0 +1,126 @@
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>3.7.2.1. License Flag Matching</title>
5<link rel="stylesheet" type="text/css" href="../book.css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7<link rel="home" href="index.html" title="Getting Started With Yocto Project">
8<link rel="up" href="enabling-commercially-licensed-recipes.html" title="3.7.2. Enabling Commercially Licensed Recipes">
9<link rel="prev" href="enabling-commercially-licensed-recipes.html" title="3.7.2. Enabling Commercially Licensed Recipes">
10<link rel="next" href="other-variables-related-to-commercial-licenses.html" title="3.7.2.2. Other Variables Related to Commercial Licenses">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="3.7.2.1. License Flag Matching">
13<div class="titlepage"><div><div><h4 class="title">
14<a name="license-flag-matching"></a>3.7.2.1. License Flag Matching</h4></div></div></div>
15<p>
16 License flag matching allows you to control what recipes
17 the OpenEmbedded build system includes in the build.
18 Fundamentally, the build system attempts to match
19 <a class="link" href="../ref-manual/var-LICENSE_FLAGS.html" target="_self"><code class="filename">LICENSE_FLAGS</code></a>
20 strings found in recipes against
21 <a class="link" href="../ref-manual/var-LICENSE_FLAGS_WHITELIST.html" target="_self"><code class="filename">LICENSE_FLAGS_WHITELIST</code></a>
22 strings found in the whitelist.
23 A match causes the build system to include a recipe in the
24 build, while failure to find a match causes the build
25 system to exclude a recipe.
26 </p>
27<p>
28 In general, license flag matching is simple.
29 However, understanding some concepts will help you
30 correctly and effectively use matching.
31 </p>
32<p>
33 Before a flag
34 defined by a particular recipe is tested against the
35 contents of the whitelist, the expanded string
36 <code class="filename">_${PN}</code> is appended to the flag.
37 This expansion makes each
38 <code class="filename">LICENSE_FLAGS</code> value recipe-specific.
39 After expansion, the string is then matched against the
40 whitelist.
41 Thus, specifying
42 <code class="filename">LICENSE_FLAGS = "commercial"</code>
43 in recipe "foo", for example, results in the string
44 <code class="filename">"commercial_foo"</code>.
45 And, to create a match, that string must appear in the
46 whitelist.
47 </p>
48<p>
49 Judicious use of the <code class="filename">LICENSE_FLAGS</code>
50 strings and the contents of the
51 <code class="filename">LICENSE_FLAGS_WHITELIST</code> variable
52 allows you a lot of flexibility for including or excluding
53 recipes based on licensing.
54 For example, you can broaden the matching capabilities by
55 using license flags string subsets in the whitelist.
56 </p>
57<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
58<h3 class="title">Note</h3>
59 When using a string subset, be sure to use the part of
60 the expanded string that precedes the appended
61 underscore character (e.g.
62 <code class="filename">usethispart_1.3</code>,
63 <code class="filename">usethispart_1.4</code>, and so forth).
64 </div>
65<p>
66 For example, simply specifying the string "commercial" in
67 the whitelist matches any expanded
68 <code class="filename">LICENSE_FLAGS</code> definition that starts
69 with the string "commercial" such as "commercial_foo" and
70 "commercial_bar", which are the strings the build system
71 automatically generates for hypothetical recipes named
72 "foo" and "bar" assuming those recipes simply specify the
73 following:
74 </p>
75<pre class="literallayout">
76 LICENSE_FLAGS = "commercial"
77 </pre>
78<p>
79 Thus, you can choose to exhaustively
80 enumerate each license flag in the whitelist and
81 allow only specific recipes into the image, or
82 you can use a string subset that causes a broader range of
83 matches to allow a range of recipes into the image.
84 </p>
85<p>
86 This scheme works even if the
87 <code class="filename">LICENSE_FLAGS</code> string already
88 has <code class="filename">_${PN}</code> appended.
89 For example, the build system turns the license flag
90 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and
91 would match both the general "commercial" and the specific
92 "commercial_1.2_foo" strings found in the whitelist, as
93 expected.
94 </p>
95<p>
96 Here are some other scenarios:
97 </p>
98<div class="itemizedlist"><ul class="itemizedlist" type="disc">
99<li class="listitem"><p>
100 You can specify a versioned string in the recipe
101 such as "commercial_foo_1.2" in a "foo" recipe.
102 The build system expands this string to
103 "commercial_foo_1.2_foo".
104 Combine this license flag with a whitelist that has
105 the string "commercial" and you match the flag
106 along with any other flag that starts with the
107 string "commercial".
108 </p></li>
109<li class="listitem"><p>
110 Under the same circumstances, you can use
111 "commercial_foo" in the whitelist and the build
112 system not only matches "commercial_foo_1.2" but
113 also matches any license flag with the string
114 "commercial_foo", regardless of the version.
115 </p></li>
116<li class="listitem"><p>
117 You can be very specific and use both the
118 package and version parts in the whitelist (e.g.
119 "commercial_foo_1.2") to specifically match a
120 versioned recipe.
121 </p></li>
122</ul></div>
123<p>
124 </p>
125</div></body>
126</html>