]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: accept '-' in bitbake variables
authorEnrico Scholz <enrico.scholz@ensc.de>
Fri, 8 Sep 2017 17:33:01 +0000 (19:33 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Nov 2017 22:39:19 +0000 (22:39 +0000)
'-' 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)

(From OE-Core rev: 2a69250abf61e51f633033ddb672e8f459191899)

Signed-off-by: Enrico Scholz <enrico.scholz@ensc.de>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
scripts/lib/wic/utils/misc.py

index 46099840ca4a2b52339c5843e6634daa89d0d82d..37e0ad6a3d96d8d6aacd499dbc19eb1f9125fee2 100644 (file)
@@ -153,7 +153,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.