summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/license.py
Commit message (Collapse)AuthorAgeFilesLines
* license.py: fix behaviour of copyleft_complianceEric Bénard2012-04-041-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | 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*. (From OE-Core rev: 987d06447d2eacf2e01f08e29469c00fbb0ef1db) Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* 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>