From: Enrico Scholz Date: Fri, 8 Sep 2017 17:33:01 +0000 (+0200) Subject: wic: accept '-' in bitbake variables X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~19991 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a69250abf61e51f633033ddb672e8f459191899;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git wic: accept '-' in bitbake variables '-' is valid and common in bitbake variables (e.g. 'FOO_pn-bar'). Accept it and other characters when reading the .env file. Also, allow variables to be empty. (From OE-Core rev: e688ac8e92d2bc451d8b2d437596f630bedccd2c) Signed-off-by: Enrico Scholz Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py index 4e07cd659c0..0792480f869 100644 --- a/scripts/lib/wic/misc.py +++ b/scripts/lib/wic/misc.py @@ -183,7 +183,7 @@ class BitbakeVars(defaultdict): self.default_image = None self.vars_dir = None - def _parse_line(self, line, image, matcher=re.compile(r"^(\w+)=(.+)")): + def _parse_line(self, line, image, matcher=re.compile(r"^([a-zA-Z0-9\-_+./~]+)=(.*)")): """ Parse one line from bitbake -e output or from .env file. Put result key-value pair into the storage.