diff mbox series

[PATCHv2,2/2] action.py: add BBPATH in bblayers_conf path for remove-layer

Message ID 20230213135525.3650-2-pedro.miguel.baptista@gmail.com
State New
Headers show
Series [PATCHv2,1/2] action.py: add BBPATH in bblayers_conf path for add-layer | expand

Commit Message

pedro.miguel.baptista@gmail.com Feb. 13, 2023, 1:55 p.m. UTC
From: Pedro Baptista <pedro.miguel.baptista@gmail.com>

By including the full path to bblayers.conf the remove-layer
command can be executed from any location, not only from the
build directory.

Signed-off-by: Pedro Baptista <pedro.miguel.baptista@gmail.com>
---
 bitbake/lib/bblayers/action.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bitbake/lib/bblayers/action.py b/bitbake/lib/bblayers/action.py
index a2208db0bc..dab4dc0107 100644
--- a/bitbake/lib/bblayers/action.py
+++ b/bitbake/lib/bblayers/action.py
@@ -65,7 +65,7 @@  class ActionPlugin(LayerPlugin):
 
     def do_remove_layer(self, args):
         """Remove one or more layers from bblayers.conf."""
-        bblayers_conf = os.path.join('conf', 'bblayers.conf')
+        bblayers_conf = os.path.join(os.environ['BBPATH'], 'conf', 'bblayers.conf')
         if not os.path.exists(bblayers_conf):
             sys.stderr.write("Unable to find bblayers.conf\n")
             return 1