After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 528758 - "import pygtk" breaks on headless machines without X
"import pygtk" breaks on headless machines without X
Status: RESOLVED INVALID
Product: pygtk
Classification: Bindings
Component: gtk
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-18 14:44 UTC by Rolf Leggewie
Modified: 2010-10-20 23:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch from openembedded.org to prevent GUI pop-up (443 bytes, patch)
2008-04-18 15:07 UTC, Rolf Leggewie
rejected Details | Review

Description Rolf Leggewie 2008-04-18 14:44:40 UTC
Hi,

openembedded.org has a patch for compiling pygtk on headless machines.  Currently, it is necessary to have X running when importing gtk for compilation (-> http://sourceforge.net/tracker/index.php?func=detail&aid=1901091&group_id=108118&atid=649652)

Regards

Rolf
Comment 1 Johan (not receiving bugmail) Dahlin 2008-04-18 14:49:00 UTC
Rolf: can you please include the patch as an attachment to this bug?
Comment 2 Rolf Leggewie 2008-04-18 15:06:19 UTC
Sure, I was just about to attach it.  You were just too quick in responding ;-)  I guess that leaves good hopes for it to be applied.  Thank you for the quick turnaround.
Comment 3 Rolf Leggewie 2008-04-18 15:07:40 UTC
Created attachment 109491 [details] [review]
patch from openembedded.org to prevent GUI pop-up
Comment 4 Johan (not receiving bugmail) Dahlin 2008-05-08 19:47:21 UTC
Comment on attachment 109491 [details] [review]
patch from openembedded.org to prevent GUI pop-up

I'm against this kind of horrendous hacks which checks the presence of variables in the main entry point.

But I *am* interested in the use case, why should _init() sometimes not be called?
Comment 5 Rolf Leggewie 2008-05-08 19:56:46 UTC
Hm, I thought it was all in the original report?

compilation of anything that does "import pygtk" breaks on a headless machine (working a bit from memory, I can check more carefully tomorrow)
Comment 6 Johan (not receiving bugmail) Dahlin 2008-05-08 20:43:18 UTC
Oh, that should already be solved in 2.12.
Can you retry with the latest stable version of PyGTK?
Comment 7 Rolf Leggewie 2008-05-09 00:56:57 UTC
Well, I am not sure it is.  I have already fixed the problem in another way in gourmet, but for the sake of this bug, I removed that change and fired off another build.

http://launchpadlibrarian.net/14379145/buildlog_ubuntu-hardy-i386.gourmet_0.13.7-1.8_FAILEDTOBUILD.txt.gz

Look for "could not open display"
Comment 8 Rolf Leggewie 2008-05-09 00:59:18 UTC
That is against hardy which has a pretty recent pygtk as far as I understand.  http://packages.ubuntu.com/python-gtk says 2.12.1 which according to www.pygtk.org is the latest stable release.
Comment 9 Johan (not receiving bugmail) Dahlin 2008-06-22 12:28:11 UTC
That's a bug in ubuntu's package, they're not shipping pygtk without patches.
Report this in the ubuntu bug tracker.
Comment 10 Rolf Leggewie 2008-06-22 12:41:49 UTC
That is absolute nonsense.  This is not even an official ubuntu package.  I created this package *specifically for you* to counterclaim your "that should already be solved in 2.12".
Comment 11 Rolf Leggewie 2008-06-22 12:45:03 UTC
openembedded is not yet up to version 2.12 of pygtk, so I cannot give you an example from openembedded.  The above build report certainly suggests this is *not* fixed in 2.12 as you claimed in comment 6.
Comment 12 Johan (not receiving bugmail) Dahlin 2008-06-22 13:49:20 UTC
It doesn't work in Ubuntu 2.12 because they patched that behavior away.
It doesn't work in PyGTK 2.8 because the fix was applied later.