diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2020-01-08 04:44:54 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-10 20:32:04 +0000 |
commit | 856ca73909b5060c3939f6c55c9c7f38ac699abb (patch) | |
tree | d8e0ff0b364d95d80312ccc79e8d002da62508bc /scripts/oe-pkgdata-browser | |
parent | aaa7eeb8e1a108ca3a180e8d2f26561b760ea3d7 (diff) | |
download | openembedded-core-contrib-856ca73909b5060c3939f6c55c9c7f38ac699abb.tar.gz |
oe-pkgdata-browser: Select a matching package when a recipe is selected
When a recipe is selected, automatically select the package that
matches the recipe name (if it exists), otherwise select the first
package.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-pkgdata-browser')
-rwxr-xr-x | scripts/oe-pkgdata-browser | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser index 75d889271b..8d223185a4 100755 --- a/scripts/oe-pkgdata-browser +++ b/scripts/oe-pkgdata-browser @@ -176,12 +176,18 @@ class PkgUi(): return recipe = model[it][RecipeColumns.Recipe] - for package in packages_in_recipe(self.pkgdata, recipe): + packages = packages_in_recipe(self.pkgdata, recipe) + for package in packages: # TODO also show PKG after debian-renaming? data = load_runtime_package(self.pkgdata, package) # TODO stash data to avoid reading in on_package_changed self.package_iters[package] = self.package_store.append([package, int(data["PKGSIZE"])]) + package = recipe if recipe in packages else sorted(packages)[0] + path = self.package_store.get_path(self.package_iters[package]) + self.package_view.set_cursor(path) + self.package_view.scroll_to_cell(path) + def on_package_changed(self, selection): self.label.set_text("") self.file_store.clear() |