From: Andrei Gherzan <[email protected]>

Some upstream layers (ex: meta-oe) use '&&' or '||' syntax in LICENSE
variable. Because of my last commit, these bbfiles are failing as LICENSE
is tested with oe.license where '&&' and '||' are the bug source.
The fix is to replace multiple characters of '&' or '|' with a single one.

Signed-off-by: Andrei Gherzan <[email protected]>
---
 meta/lib/oe/license.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/lib/oe/license.py b/meta/lib/oe/license.py
index 7ab66e7..5b8d47c 100644
--- a/meta/lib/oe/license.py
+++ b/meta/lib/oe/license.py
@@ -18,6 +18,7 @@ license_pattern = re.compile('[a-zA-Z0-9.+_\-]+$')
 class LicenseVisitor(ast.NodeVisitor):
     """Syntax tree visitor which can accept OpenEmbedded license strings"""
     def visit_string(self, licensestr):
+       licensestr = re.sub(r'([|&])\1+', r'\1', licensestr)
         new_elements = []
         elements = filter(lambda x: x.strip(), 
license_operator.split(licensestr))
         for pos, element in enumerate(elements):
-- 
1.7.5.4


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to