| Submitter | Joshua Lock |
|---|---|
| Date | March 31, 2012, 1:05 a.m. |
| Message ID | <72c1e44f0bc8b40583d16ff8b396faf8cf62fed9.1333155656.git.josh@linux.intel.com> |
| Download | mbox | patch |
| Permalink | /patch/24967/ |
| State | New |
| Headers | show |
Comments
On Friday 30 March 2012 18:05:29 Joshua Lock wrote: > Hob uses API from pygtk 2.22, therefore check to see whether this > version is available and exit cleanly if not. Apparently Belen and Giulia have been doing their hob testing on an F15 machine (fully up-to-date) and it was working OK, now it is blocked by this check - the version of PyGTK+ on there is 2.17. Is that intended/desirable? Cheers, Paul
On 05/04/12 09:32, Paul Eggleton wrote: > On Friday 30 March 2012 18:05:29 Joshua Lock wrote: >> Hob uses API from pygtk 2.22, therefore check to see whether this >> version is available and exit cleanly if not. > > Apparently Belen and Giulia have been doing their hob testing on an F15 > machine (fully up-to-date) and it was working OK, now it is blocked by this > check - the version of PyGTK+ on there is 2.17. > > Is that intended/desirable? Not at all, we're definitely using method calls which the API docs tell me are only available in pygtk 2.22 or newer... I guess this isn't the case. It's beginning to look like the API is from Gtk+ 2.22 but that pygtk fell out of sync for version numbers, I'll change the check to test the Gtk+ version. FYI the goal is to lower the required API to Gtk+ 2.18.x and pygtk 2.16.x as are shipped with CentOS 6. Cheers, Joshua
Patch
diff --git a/lib/bb/ui/hob.py b/lib/bb/ui/hob.py index e72ab23..2f595cb 100755 --- a/lib/bb/ui/hob.py +++ b/lib/bb/ui/hob.py @@ -20,10 +20,17 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -import gobject -import gtk import sys import os +try: + import gobject + import gtk + import pygtk + pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?! + if gtk.pygtk_version < (2, 22, 0): + sys.exit("FATAL: PyGtk version 2.22.x or later is required to use Hob") +except: + sys.exit("FATAL: PyGtk (version 2.22.x or later) is required to use Hob") sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) try: import bb
Hob uses API from pygtk 2.22, therefore check to see whether this version is available and exit cleanly if not. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/hob.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)