Skip to contentSkip to conversation

bitbake-setup: Add strip to value from settings.conf

PATCH New Liu Yiding 1 participant 1 message Feb 10

lore
Share & tools
lore

Liu Yiding

author
#0 lore raw

PATCH v4 1/1 bitbake-setup: Add strip to value from settings.conf

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. Other settings value also need this fix.

---
 bin/bitbake-setup | 5 +++++
 1 file changed, 5 insertions(+)
bin/bitbake-setup +5 -0
index d0d9929d3..927c03a10 100755
@@ -920,6 +920,11 @@ def load_settings(settings_path):
     if os.path.exists(settings_path):
         logger.info('Loading settings from {}'.format(settings_path))
         settings.read_file(open(settings_path))
+
+        for section in settings.sections():
+            for key, value in settings[section].items():
+                settings[section][key] = value.strip('\"\'')
+
     return settings
 
 def change_setting(top_dir, args):
Signature · 1 line
2.43.0