aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
AgeCommit message (Collapse)Author
2015-05-09license: Add support for handle INCOMPATIBLE_LICENSE in manifest creationAníbal Limón
When INCOMPATIBLE_LICENSE's is specified it need to be removed from license.manifest and also avoid copy to target image. Add ManifestVisitor that walk the license string searching for INCOMPATIBLE_LICENSE's if found remove it. [YOCTO #6765] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09license: Split visit_string in LicenseVisitorAníbal Limón
Create get_elements and visit_elements in LicenseVisitor based on visit_string this allow to do modifications on elements before parsing with AST. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09license_class: Generalize license_ok functionAníbal Limón
Add dont_want_licenses as parameter to license_ok function and move it to oe.license module in order to use in other modules. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-07classes/license: tweak license format messagesPaul Eggleton
Strictly speaking not all of these characters are operators, so reword the message to describe them as separators. Also use the standard "recipename: message" format. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2013-05-09meta/lib/oe: Replace StandardError with ExceptionRichard Purdie
StandardError is removed in python3, replace with Exception class instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-04license.py: fix behaviour of copyleft_complianceEric Bénard
actually if a package has a license in its LICENSE variable which is not in the whitelist nor in the blacklist and even if an other license in this variable is in the whitelist, the package gets excluded and is not taken in account in the copyleft_compliance. This patch solves this by excluding a recipe _only_ if the LICENSE variable includes a pattern from the blacklist and including a recipe only if it includes a variable from the whitelist _and_ none from the blacklist. Example in busybox which has LICENSE="GPLv2 & BSD-4-Clause", with the actual behaviour (where he blacklist contains only CLOSED Proprietary) we get : DEBUG: copyleft: busybox-1.19.4 is excluded: recipe has excluded licenses: BSD-4-Clause which is not sane because busybox is covered by a copyleft license which is GPLv2 and should match the default whitelist which is GPL* LGPL*. Signed-off-by: Eric Bénard <eric@eukrea.com>
2012-01-17oe.license: avoid the need to catch SyntaxErrorChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2012-01-17oe.license: add is_included convenience functionChristopher Larson
Given a license string and whitelist and blacklist, determine if the license string matches the whitelist and does not match the blacklist. When encountering an OR, it prefers the side with the highest weight (more included licenses). It then checks the inclusion of the flattened list of licenses from there. Returns a tuple holding the boolean state and a list of the applicable licenses which were excluded (or None, if the state is True) Examples: is_included, excluded = oe.license.is_included(licensestr, ['GPL*', 'LGPL*']) is_included, excluded = oe.license.is_included(licensestr, blacklist=['Proprietary', 'CLOSED']) Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2011-12-08oe.license: add license flattening codeChristopher Larson
This flattens a license tree by selecting one side of each OR operation (chosen via the user supplied function). Signed-off-by: Christopher Larson <kergoth@gmail.com>
2011-12-08license: split license parsing into oe.licenseChristopher Larson
In addition to moving this functionality to oe.license, makes the string preparation more picky before passing it off to the ast compilation. This ensures that LICENSE entries like 'GPL/BSD' are seen as invalid (due to the presence of the unsupported '/'). Signed-off-by: Christopher Larson <kergoth@gmail.com>