diff options
author | Ross Burton <ross@burtonini.com> | 2020-09-24 15:25:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-01 22:05:12 +0000 |
commit | 0d4f80535e7ebb799a70761e83a40905f2c14535 (patch) | |
tree | 08cbc57d3dc71cfea35ca05b5b0be6636ad8f4f2 /bitbake/lib/bb | |
parent | 424296bf9bb4bae27febf91bce0118df09ce5fa1 (diff) | |
download | poky-0d4f80535e7ebb799a70761e83a40905f2c14535.tar.gz |
bitbake: taskexp: update for GTK API changes
The introspected API for GtkTreeModel and friends had some unexpected
quirks which have now been fixed, see[1] for details. However, for
example Ubuntu 20.04 has the fixed GTK but not an updated pygobject which
means taskexp raises an exception on startup.
Solve by manually looking at what functions are present and calling the
right one.
[ YOCTO #14055 ]
[1] https://gitlab.gnome.org/GNOME/pygobject/-/commit/9cdbc56fbac4db2de78dc080934b8f0a7efc892a
(Bitbake rev: d171188cf966852326916f726cbd3ca9627b831c)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ac7d1114a7e99e6efd6a37b03d170faf678513fb)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/ui/taskexp.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/ui/taskexp.py b/bitbake/lib/bb/ui/taskexp.py index 05e32338c2..2b246710ca 100644 --- a/bitbake/lib/bb/ui/taskexp.py +++ b/bitbake/lib/bb/ui/taskexp.py | |||
@@ -58,7 +58,12 @@ class PackageReverseDepView(Gtk.TreeView): | |||
58 | self.current = None | 58 | self.current = None |
59 | self.filter_model = model.filter_new() | 59 | self.filter_model = model.filter_new() |
60 | self.filter_model.set_visible_func(self._filter) | 60 | self.filter_model.set_visible_func(self._filter) |
61 | self.sort_model = self.filter_model.sort_new_with_model() | 61 | # The introspected API was fixed but we can't rely on a pygobject that hides this. |
62 | # https://gitlab.gnome.org/GNOME/pygobject/-/commit/9cdbc56fbac4db2de78dc080934b8f0a7efc892a | ||
63 | if hasattr(Gtk.TreeModelSort, "new_with_model"): | ||
64 | self.sort_model = Gtk.TreeModelSort.new_with_model(self.filter_model) | ||
65 | else: | ||
66 | self.sort_model = self.filter_model.sort_new_with_model() | ||
62 | self.sort_model.set_sort_column_id(COL_DEP_PARENT, Gtk.SortType.ASCENDING) | 67 | self.sort_model.set_sort_column_id(COL_DEP_PARENT, Gtk.SortType.ASCENDING) |
63 | self.set_model(self.sort_model) | 68 | self.set_model(self.sort_model) |
64 | self.append_column(Gtk.TreeViewColumn(label, Gtk.CellRendererText(), text=COL_DEP_PARENT)) | 69 | self.append_column(Gtk.TreeViewColumn(label, Gtk.CellRendererText(), text=COL_DEP_PARENT)) |