summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
Commit message (Collapse)AuthorAgeFilesLines
* oe.license: avoid the need to catch SyntaxErrorChristopher Larson2012-01-171-4/+19
| | | | | | | (From OE-Core rev: cace9ddc0edd654877d968643960fa4343472b58) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe.license: add is_included convenience functionChristopher Larson2012-01-171-0/+36
| | | | | | | | | | | | | | | | | | | | | | 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']) (From OE-Core rev: 7903433898b4683a1c09cc9a6a379421bc9bbd58) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe.license: add license flattening codeChristopher Larson2011-12-081-0/+30
| | | | | | | | | | This flattens a license tree by selecting one side of each OR operation (chosen via the user supplied function). (From OE-Core rev: 6984961314c8ba2aceab9acabb658f96ed249fef) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license: split license parsing into oe.licenseChristopher Larson2011-12-081-0/+32
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 '/'). (From OE-Core rev: 20d4068045c76e9dc2aff0c152dd02d6a109c9dd) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>