summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2020-01-08 04:44:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-10 20:32:04 +0000
commit856ca73909b5060c3939f6c55c9c7f38ac699abb (patch)
treed8e0ff0b364d95d80312ccc79e8d002da62508bc
parentaaa7eeb8e1a108ca3a180e8d2f26561b760ea3d7 (diff)
downloadopenembedded-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>
-rwxr-xr-xscripts/oe-pkgdata-browser8
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()