From 30cdf93d0c3791a2463f99963daf253f3d093fb1 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Tue, 26 Mar 2013 16:54:32 -0700 Subject: [PATCH] ref-manual: Edits to the license flag matching section. Partial edits. (From yocto-docs rev: 32c1d40eff9a3e27d5ec09bde57e2c344bb2ded9) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../ref-manual/technical-details.xml | 66 +++++++++++-------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml index 1f3901358b..d66d7050a1 100644 --- a/documentation/ref-manual/technical-details.xml +++ b/documentation/ref-manual/technical-details.xml @@ -902,48 +902,60 @@ License Flag Matching - The definition of "matching" in reference to a - recipe's LICENSE_FLAGS setting is simple. - However, some things exist that you should know about in order to - correctly and effectively use it. + In general, license flag matching is simple. + However, understanding some concepts will help you + correctly and effectively use matching. Before a flag defined by a particular recipe is tested against the contents of the LICENSE_FLAGS_WHITELIST variable, the - string _${PN} (with - PN expanded of course) is - appended to the flag, thus automatically making each - LICENSE_FLAGS value recipe-specific. - That string is - then matched against the whitelist. - So if you specify LICENSE_FLAGS = "commercial" in recipe - "foo" for example, the string "commercial_foo" - would normally be what is specified in the whitelist in order for it to - match. + expanded string _${PN} is + appended to the flag. + This expansion makes each LICENSE_FLAGS + value recipe-specific. + After expansion, the string is then matched against the + whitelist. + Thus, specifying LICENSE_FLAGS = "commercial" + in recipe "foo" for example, results in the string + "commercial_foo". + And that string would normally be appears in the whitelist + in order for a match to occur. - You can broaden the match by - putting any "_"-separated beginning subset of a - LICENSE_FLAGS flag in the whitelist, which will also - match. - For example, simply specifying "commercial" in - the whitelist would match any expanded LICENSE_FLAGS - definition starting with "commercial" such as - "commercial_foo" and "commercial_bar", which are the - strings that would be automatically generated for - hypothetical "foo" and "bar" recipes assuming those - recipes had simply specified the following: + Judicious use of the LICENSE_FLAGS + strings and the contents of the + LICENSE_FLAGS_WHITELIST variable + allows you a lot of flexibility for matching license + flags. + For example, you can broaden the matching capabilities by + using string subsets from the LICENSE_FLAGS + variables in the whitelist. + Be sure to use the part of the expanded + string that precedes + the underscore character (e.g. + usethispart_1.3, + usethispart_1.4, and so forth). + + For example, simply specifying the string "commercial" in + the whitelist matches any expanded + LICENSE_FLAGS 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: LICENSE_FLAGS = "commercial" - Broadening the match allows for a range of specificity for the items - in the whitelist, from more general to perfectly + Judicious use of the strings with the + LICENSE_FLAGS variable and the Broadening the match allows for a range of specificity for the + items in the whitelist, from more general to perfectly specific. So you have the choice of exhaustively enumerating each license flag in the whitelist to