summaryrefslogtreecommitdiff
path: root/meta/lib/oe/license.py
AgeCommit message (Collapse)AuthorFiles
2012-01-17oe.license: avoid the need to catch SyntaxErrorChristopher Larson1
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2012-01-17oe.license: add is_included convenience functionChristopher Larson1
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 Larson1
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 Larson1
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>