[oe-commits] [openembedded-core] 23/48: oe-pkgdata-browser: Select a matching package when a recipe is selected

git at git.openembedded.org git at git.openembedded.org
Thu Jan 9 21:39:36 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit b01ddc00b9b13faec8b3d38be2abbbc91d31d156
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Wed Jan 8 04:44:54 2020 +0100

    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 at axis.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/oe-pkgdata-browser | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-pkgdata-browser b/scripts/oe-pkgdata-browser
index 75d8892..8d22318 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()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list