diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-28 15:41:37 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2020-07-01 05:24:29 -1000 |
commit | 1d3892d93ee9688d69f5bb5ea6aef8b1152bd1e3 (patch) | |
tree | bd25170ad3b1c44e3fabec29fc9016c750c2e388 /lib/bb | |
parent | 6d780fe3a111adbf3f3d2dda22d5a0787b195b62 (diff) | |
download | bitbake-contrib-1d3892d93ee9688d69f5bb5ea6aef8b1152bd1e3.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 41988fec47eb196ab7195a75330a6d98de19101b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/msg.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/msg.py b/lib/bb/msg.py index c0b344e32..2d88c4e72 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) |