summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-28 15:41:37 +0100
committerSteve Sakoman <steve@sakoman.com>2020-07-01 05:24:29 -1000
commit1d3892d93ee9688d69f5bb5ea6aef8b1152bd1e3 (patch)
treebd25170ad3b1c44e3fabec29fc9016c750c2e388
parent6d780fe3a111adbf3f3d2dda22d5a0787b195b62 (diff)
downloadbitbake-contrib-stable/1.46-nut.tar.gz
bitbake-contrib-stable/1.46-nut.tar.bz2
bitbake-contrib-stable/1.46-nut.zip
msg: Avoid issues where paths have relative componentsstable/1.46-nutstable/1.46-next
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 41988fec47eb196ab7195a75330a6d98de19101b) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--lib/bb/msg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py
index c0b344e323..2d88c4e72d 100644
--- a/lib/bb/msg.py
+++ b/lib/bb/msg.py
@@ -280,7 +280,7 @@ def setLoggingConfig(defaultconfig, userconfigfile=None):
logconfig = copy.deepcopy(defaultconfig)
if userconfigfile:
- with open(userconfigfile, 'r') as f:
+ with open(os.path.normpath(userconfigfile), 'r') as f:
if userconfigfile.endswith('.yml') or userconfigfile.endswith('.yaml'):
import yaml
userconfig = yaml.load(f)