diff mbox series

bitbake-setup: ensure args.setup_dir is an absolute path

Message ID 20260324094446.876081-1-alex.kanavin@gmail.com
State New
Headers show
Series bitbake-setup: ensure args.setup_dir is an absolute path | expand

Commit Message

Alexander Kanavin March 24, 2026, 9:44 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

This fixes another corner case:
'bitbake-setup update --setup-dir ./relative/path'

Normally setup-dir is deduced from bitbake environment, but when
it is passed in on the command line as a relative path, and there
is something to update, new bblayer.conf is created with relative
paths in it, causing breakage.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index dcad9c169..db44b7727 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -746,7 +746,7 @@  def are_layers_changed(layers, layerdir, d):
     return changed
 
 def build_status(top_dir, settings, args, d, update=False):
-    setupdir = args.setup_dir
+    setupdir = os.path.abspath(args.setup_dir)
 
     confdir = os.path.join(setupdir, "config")
     layerdir = os.path.join(setupdir, "layers")