Skip to contentSkip to conversation

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

PATCH New Alexander Kanavin 1 participant 1 message Jan 14

lore
Share & tools
lore
#0 lore raw

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

From: Alexander Kanavin <[email protected]>

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.

---
 bin/bitbake-setup | 1 +
 1 file changed, 1 insertion(+)
bin/bitbake-setup +1 -0
index 4ed06fc62..4d709ed8c 100755
@@ -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)
Signature · 1 line
2.47.3