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-07-02 16:11:40 +0100
commitc587a49adcf5f24fd8611db259e576428d14e8fb (patch)
tree2f7737ed1457286759234fcbf554f9c5614844cf /bitbake
parentb020384e8534defcc3bc801ddeef67fd7980a389 (diff)
downloadpoky-c587a49adcf5f24fd8611db259e576428d14e8fb.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: 1d3892d93ee9688d69f5bb5ea6aef8b1152bd1e3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 41988fec47eb196ab7195a75330a6d98de19101b) Signed-off-by: Steve Sakoman <steve@sakoman.com> 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)