summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 15:41:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 15:42:52 +0100
commite21201ec3b5248a1d6433d90284b42fe4e1c86ec (patch)
tree4f3d08a3dc335a702ebe9d4cc1fbe46afa99b696 /bitbake
parent8ea8f0acb6d1966c42fe0725dbb854f220d966de (diff)
downloadpoky-e21201ec3b5248a1d6433d90284b42fe4e1c86ec.tar.gz
bitbake: msg: Avoid issues where paths have relative components
The autobuilder can end up using build/../ syntax which is an issue if the build directory is cleaned. Avoid this by using normpath() on the file path passed in. (Bitbake rev: 41988fec47eb196ab7195a75330a6d98de19101b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/msg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/msg.py b/bitbake/lib/bb/msg.py
index c0b344e323..2d88c4e72d 100644
--- a/bitbake/lib/bb/msg.py
+++ b/bitbake/lib/bb/msg.py
@@ -280,7 +280,7 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
280 logconfig = copy.deepcopy(defaultconfig) 280 logconfig = copy.deepcopy(defaultconfig)
281 281
282 if userconfigfile: 282 if userconfigfile:
283 with open(userconfigfile, 'r') as f: 283 with open(os.path.normpath(userconfigfile), 'r') as f:
284 if userconfigfile.endswith('.yml') or userconfigfile.endswith('.yaml'): 284 if userconfigfile.endswith('.yml') or userconfigfile.endswith('.yaml'):
285 import yaml 285 import yaml
286 userconfig = yaml.load(f) 286 userconfig = yaml.load(f)