diff mbox series

bitbake-setup: ensure 'list' does not write anything into top dir

Message ID 20260114113914.2998470-1-alex.kanavin@gmail.com
State New
Headers show
Series bitbake-setup: ensure 'list' does not write anything into top dir | expand

Commit Message

Alexander Kanavin Jan. 14, 2026, 11:39 a.m. UTC
From: Alexander Kanavin <alex@linutronix.de>

The goal for the 'list' command is to not leave any files or directories
behind, as it may be issued before the user has decided where to
place the top directory. 'list' redirects the top directory
to a temporary location, but it didn't do the same for the downloads,
which led to the default top directory being polluted with them.
This has now been fixed.

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

Patch

diff --git a/bin/bitbake-setup b/bin/bitbake-setup
index 4ed06fc62..4d709ed8c 100755
--- a/bin/bitbake-setup
+++ b/bin/bitbake-setup
@@ -785,6 +785,7 @@  def list_registry(registry_path, with_expired):
 def list_configs(settings, args):
     import tempfile
     top_dir = tempfile.mkdtemp(prefix="bitbake-setup-list-")
+    settings['default']['dl-dir'] = os.path.join(top_dir, '.bitbake-setup-downloads')
     d = init_bb_cache(top_dir, settings, args)
     registry_path = update_registry(settings["default"]["registry"], cache_dir(top_dir), d)
     json_data = list_registry(registry_path, args.with_expired)