diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-11 15:04:19 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-11 17:09:17 +0000 |
commit | e21c967bd4d1a20ceee869e6cd7020a066bdc497 (patch) | |
tree | 734b1d7a62bdf7dab9d5973762c62ec38aad7780 | |
parent | 0a0052e4563e3e387738ea485d4eae83d37e2ece (diff) | |
download | poky-e21c967bd4d1a20ceee869e6cd7020a066bdc497.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: 25a8ec6e2891b71bc280aacaf5f62ecc4b0bd1d1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/oe-pkgdata-browser | 6 |
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 |