Bug 6891

Summary: Port depexp to python GI
Product: [Build System, Metadata & Runtime] BitBake Reporter: Patrick Ohly <patrick.ohly>
Component: bitbakeAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: poky.bs.watcher, poky.watcher
Version: 1.7   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
use gi.repository as fallback for gobject none

Description Patrick Ohly 2014-10-27 12:28:40 UTC
Created attachment 2213 [details]
use gi.repository as fallback for gobject

On recent Linux distros (OpenSuse 13.1, Debian Jessie), depexp fails to start because "import gobject" is no longer possible because gobject was replaced by gi.repository.

Checking for both gets depexp working again. It was failing in Yocto 1.7_M2-955-g6af05a9.
Comment 1 Ross Burton 2014-10-30 14:58:34 UTC
Honestly surprised that just replacing gobject with gi.repository works, as the API isn't the same.  Errors don't go to the screen when you use depexp so this might sort-of work but not really.

There are two proper fixes:
1) This is PyGTK2 code, install pygtk2
2) Port to py-gi

Sort term people should do (1).  I'll change this bug to (2) in the long-term.
Comment 2 Patrick Ohly 2014-10-30 15:52:12 UTC
Comment on attachment 2213 [details]
use gi.repository as fallback for gobject

Ross, you are right. I think I ran into the missing gobject first, worked around it as shown in the patch, then found the missing gtk and installed that, too, pulling in the missing gobject.

In other words, the patch is unnecessary.

If I may offer a suggestion: swap the order of the imports of gtk and gobject. When gtk is imported first and that fails, users will install it and then also automatically get gobject because of package dependencies.

The advantages are a) less work for the user and b) on Debian, python-gobject2 remains marked as automatically installed and gets uninstalled when removing python-gtk.
Comment 3 Ross Burton 2016-07-01 12:03:16 UTC
Merged in bitbake 8eee64a64144e27b5b8c2aca88e138882c3deab7.