scripts/oe-package-browser: Fix after overrides change
PATCH 1/2 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]
Signed-off-by Richard Purdie <[email protected]>
--- scripts/oe-pkgdata-browser | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/oe-pkgdata-browser +3 -3
@@ -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
Signature · 1 line
2.32.0
PATCH 2/2 scripts/oe-package-browser: Handle no packages being built
Give the user a proper error message if there aren't packages built, rather than a less friendly traceback.
[YOCTO #14619]
Signed-off-by Richard Purdie <[email protected]>
--- scripts/oe-pkgdata-browser | 2 ++ 1 file changed, 2 insertions(+)
scripts/oe-pkgdata-browser +2 -0
@@ -236,6 +236,8 @@ class PkgUi(): update_deps("RPROVIDES", "Provides: ", self.provides_label, clickable=False) def load_recipes(self): + if not os.path.exists(pkgdata): + sys.exit("Error: Please ensure %s exists by generating packages before using this tool." % pkgdata) for recipe in sorted(os.listdir(pkgdata)): if os.path.isfile(os.path.join(pkgdata, recipe)): self.recipe_iters[recipe] = self.recipe_store.append([recipe])
Signature · 1 line
2.32.0