From 5630cb5ccd4d16c192e5c40fd2972e275ce04cfe Mon Sep 17 00:00:00 2001 From: Pedro Baptista Date: Wed, 15 Feb 2023 22:51:09 +0000 Subject: bitbake: action.py: add topdir in bblayers_conf path for add-layer By including the full path to bblayers.conf the add-layer command can be executed from any location, not only from the build directory. (Bitbake rev: 77aa230bf2a053fc0941723a6abbc798ebe53a19) Signed-off-by: Pedro Baptista Signed-off-by: Richard Purdie --- bitbake/lib/bblayers/action.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py index 454c251410..d1ba101de2 100644 --- a/bitbake/lib/bblayers/action.py +++ b/bitbake/lib/bblayers/action.py @@ -11,6 +11,7 @@ import shutil import sys import tempfile +from bb.cookerdata import findTopdir import bb.utils from bblayers.common import LayerPlugin @@ -37,7 +38,7 @@ class ActionPlugin(LayerPlugin): sys.stderr.write("Specified layer directory %s doesn't contain a conf/layer.conf file\n" % layerdir) return 1 - bblayers_conf = os.path.join('conf', 'bblayers.conf') + bblayers_conf = os.path.join(findTopdir(),'conf', 'bblayers.conf') if not os.path.exists(bblayers_conf): sys.stderr.write("Unable to find bblayers.conf\n") return 1 -- cgit v1.2.3-54-g00ecf