]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/oe-package-browser: Fix after overrides change
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Nov 2021 15:04:19 +0000 (15:04 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Nov 2021 17:04:09 +0000 (17:04 +0000)
After the overrides change, the format of pkgdata changed and this
usage of configparser no longer works. This change is a bandaid to make
things work but the pkgdata format isn't very similar to ini files
so this may need to be reimplmented in a better way in the long run.

[YOCTO #14619]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/oe-pkgdata-browser

index 8d223185a436f7aef5344373d79d6730456757d5..e07005b8070c864819b3054b473f29160f4b362d 100755 (executable)
@@ -49,11 +49,11 @@ def load(filename, suffix=None):
     from configparser import ConfigParser
     from itertools import chain
 
-    parser = ConfigParser()
+    parser = ConfigParser(delimiters=('='))
     if suffix:
-        parser.optionxform = lambda option: option.replace("_" + suffix, "")
+        parser.optionxform = lambda option: option.replace(":" + suffix, "")
     with open(filename) as lines:
-        lines = chain(("[fake]",), lines)
+        lines = chain(("[fake]",), (line.replace(": ", " = ", 1) for line in lines))
         parser.read_file(lines)
 
     # TODO extract the data and put it into a real dict so we can transform some