summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-11 15:04:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-21 11:41:39 +0000
commite8d40a2dab3766532cbd9a819e8207e5c1215b61 (patch)
tree6e3da2df96927006a329374f7742f187afe0cb68
parent7884e05de96a4be27fbc98da8725d285064b16de (diff)
downloadpoky-e8d40a2dab3766532cbd9a819e8207e5c1215b61.tar.gz
scripts/oe-package-browser: Fix after overrides change
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] (From OE-Core rev: b27a11f4ddc0c10ff7e5fb447431bff1411a5417) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 25a8ec6e2891b71bc280aacaf5f62ecc4b0bd1d1) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/oe-pkgdata-browser6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index 8d223185a4..e07005b807 100755
--- a/scripts/oe-pkgdata-browser
+++ b/scripts/oe-pkgdata-browser
@@ -49,11 +49,11 @@ def load(filename, suffix=None):
49 from configparser import ConfigParser 49 from configparser import ConfigParser
50 from itertools import chain 50 from itertools import chain
51 51
52 parser = ConfigParser() 52 parser = ConfigParser(delimiters=('='))
53 if suffix: 53 if suffix:
54 parser.optionxform = lambda option: option.replace("_" + suffix, "") 54 parser.optionxform = lambda option: option.replace(":" + suffix, "")
55 with open(filename) as lines: 55 with open(filename) as lines:
56 lines = chain(("[fake]",), lines) 56 lines = chain(("[fake]",), (line.replace(": ", " = ", 1) for line in lines))
57 parser.read_file(lines) 57 parser.read_file(lines)
58 58
59 # TODO extract the data and put it into a real dict so we can transform some 59 # TODO extract the data and put it into a real dict so we can transform some