summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-09-07 17:05:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-09-08 09:55:55 +0100
commitb23e51e6c961cf3f7e2aaf89648fecce78424c99 (patch)
tree4263c95b3ed3cff55209ab1bca9a31521c413e6f /meta
parentfa8dad209247b780590bc8476b5b16e6608d7907 (diff)
downloadopenembedded-core-b23e51e6c961cf3f7e2aaf89648fecce78424c99.tar.gz
openembedded-core-b23e51e6c961cf3f7e2aaf89648fecce78424c99.tar.bz2
openembedded-core-b23e51e6c961cf3f7e2aaf89648fecce78424c99.zip
base.bbclass: fix substring matching in COMMERCIAL_LICENSE
Previously, if for example you had a package called "mx", and a second package called "libomxil" listed in COMMERCIAL_LICENSE (without mx being listed there), it would match mx as being commercially licensed because mx is a substring of libomxil. Fix the search to ensure it only matches the listed package name exactly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/base.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 3501f4becb..104bec8628 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -340,9 +340,9 @@ python () {
if license == "INVALID":
bb.fatal('This recipe does not have the LICENSE field set (%s)' % pn)
- commercial_license = bb.data.getVar('COMMERCIAL_LICENSE', d, 1)
+ commercial_license = " %s " % bb.data.getVar('COMMERCIAL_LICENSE', d, 1)
import re
- pnr = pn.replace('+', "\+")
+ pnr = "[ \t]%s[ \t]" % pn.replace('+', "\+")
if commercial_license and re.search(pnr, commercial_license):
bb.debug(1, "Skipping %s because it's commercially licensed" % pn)
raise bb.parse.SkipPackage("because it may require a commercial license to ship in a product (listed in COMMERCIAL_LICENSE)")