From e21201ec3b5248a1d6433d90284b42fe4e1c86ec Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 28 Jun 2020 15:41:37 +0100 Subject: 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 --- bitbake/lib/bb/msg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/msg.py') 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): 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) -- cgit v1.2.3-54-g00ecf