Skip to contentSkip to conversation

bitbake-setup: Add strip to dldir

PATCH New Yiding Liu (Fujitsu) 1 participant 1 message Feb 5

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake-setup: Add strip to dldir

If user add "" to dl-dir as DL_DIR, it will show FetchError as following.

raise FetchError("Unable to fetch URL from any source.", u)
bb.fetch2.FetchError: Fetcher failure for URL: 'git://git.openembedded.org/bitbake;protocol=https;rev=master;branch=master;destsuffix=bitbake'. Unable to fetch URL from any source.

But from this log, user can't locate the real reason which is that the path "/aa/bb" is invalid.

So I make this fix, even if user add "" to dl-dir, the dl-dir will be the valid path.

---
 bin/bitbake-setup | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-setup +1 -1
index abe7614c8..2ea5a5f3b 100755
@@ -41,7 +41,7 @@ def cache_dir(top_dir):
     return os.path.join(top_dir, '.bitbake-setup-cache')
 
 def init_bb_cache(top_dir, settings, args):
-    dldir = settings["default"]["dl-dir"]
+    dldir = settings["default"]["dl-dir"].strip('"')
     bb_cachedir = os.path.join(cache_dir(top_dir), 'bitbake-cache')
 
     d = bb.data.init()
Signature · 1 line
2.43.0