summaryrefslogtreecommitdiffstats
path: root/scripts
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 21:18:22 +0000
commit77bba85df1eed9cb3ee90876d5bae8e2203a028f (patch)
tree3f823ada6f406b746fe6c8b5e371ff21c853a757 /scripts
parentc4f462412f8ea0c82d2384684c6280e8f5efd2c1 (diff)
downloadpoky-77bba85df1eed9cb3ee90876d5bae8e2203a028f.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. (From OE-Core rev: 856ca73909b5060c3939f6c55c9c7f38ac699abb) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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():
176 return 176 return
177 177
178 recipe = model[it][RecipeColumns.Recipe] 178 recipe = model[it][RecipeColumns.Recipe]
179 for package in packages_in_recipe(self.pkgdata, recipe): 179 packages = packages_in_recipe(self.pkgdata, recipe)
180 for package in packages:
180 # TODO also show PKG after debian-renaming? 181 # TODO also show PKG after debian-renaming?
181 data = load_runtime_package(self.pkgdata, package) 182 data = load_runtime_package(self.pkgdata, package)
182 # TODO stash data to avoid reading in on_package_changed 183 # TODO stash data to avoid reading in on_package_changed
183 self.package_iters[package] = self.package_store.append([package, int(data["PKGSIZE"])]) 184 self.package_iters[package] = self.package_store.append([package, int(data["PKGSIZE"])])
184 185
186 package = recipe if recipe in packages else sorted(packages)[0]
187 path = self.package_store.get_path(self.package_iters[package])
188 self.package_view.set_cursor(path)
189 self.package_view.scroll_to_cell(path)
190
185 def on_package_changed(self, selection): 191 def on_package_changed(self, selection):
186 self.label.set_text("") 192 self.label.set_text("")
187 self.file_store.clear() 193 self.file_store.clear()