Bug 6891 - Port depexp to python GI
Summary: Port depexp to python GI
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-27 12:28 UTC by Patrick Ohly
Modified: 2016-07-01 12:03 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
use gi.repository as fallback for gobject (1.82 KB, patch)
2014-10-27 12:28 UTC, Patrick Ohly
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.