Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47879 - straw (0.22.1) ebuild fails to open display
Summary: straw (0.22.1) ebuild fails to open display
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 49877
  Show dependency tree
 
Reported: 2004-04-14 20:58 UTC by Albert Hopkins (RETIRED)
Modified: 2004-06-26 14:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Hopkins (RETIRED) gentoo-dev 2004-04-14 20:58:25 UTC
Attempting to emerge straw, I get the following error:

--------------------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 43, in ?    from _gtk import *
RuntimeError: could not open display
 * The gnome-python gtkhtml2 module was not found.
 * Rebuild gnome-python using:
 *   USE="gtkhtml" emerge gnome-python
                                                                                
!!! ERROR: net-www/straw-0.22.1 failed.
!!! Function pkg_setup, Line 35, Exitcode 0
!!! missing gtkhtml2 python module
--------------------------------------------------------------------------------

I was able to get around this by "export DISPLAY=:0" and "xhost +" on my X server, but I think it should not need a DISPLAY to build (there may be no way around this).
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-04-19 06:48:29 UTC
wasn't sure weither to assign it to the gnome or python herd
Comment 2 foser (RETIRED) gentoo-dev 2004-04-19 08:08:34 UTC
more a pygtk problem i think ?
Comment 3 Lukasz Strzygowski (RETIRED) gentoo-dev 2004-05-01 08:07:01 UTC
"""
if ! python -c 'import gtk; import gtkhtml2'; then
     eerror "The gnome-python gtkhtml2 module was not found."
     eerror "Rebuild gnome-python using:"
     eerror "  USE=\"gtkhtml\" emerge gnome-python"
     die "missing gtkhtml2 python module"
fi
"""

replacing above code in straw-0.22.1.ebuild with this should fix:
"""
if ! grep gtkhtml /var/db/pkg/dev-python/gnome-python-*/USE &>/dev/null; then
     eerror "You have to emerge gnome-python with gtkhtml in USE"
     die "missing gtkhtml2 python module"
fi
"""
Comment 4 Lukasz Strzygowski (RETIRED) gentoo-dev 2004-05-02 10:35:56 UTC
kloeri told me to use virtualx instead of grepping /var/db/... so here is corrected function:

"""
pkg_setup() {
    export maketype="python -c"
    if ! virtualmake 'import gtk; import gtkhtml2'; then
        eerror "The gnome-python gtkhtml2 module was not found."
        eerror "Rebuild gnome-python using:"
        eerror "  USE=\"gtkhtml\" emerge gnome-python"
        die "missing gtkhtml2 python module"
    fi
}
"""

it doesn't work without a little change if virtualmake function in virtualx.eclass. we need to change
${maketype} $* to: ${maketype} "$*", because even with correct quotes it will split virtualmake arguments into 'import' 'gtk;' 'import' 'gtkhtml2'.
Comment 5 Alastair Tse (RETIRED) gentoo-dev 2004-06-26 13:31:14 UTC
how about using this?

export maketype="python"
echo "import pygtk; import gtkhtml2" | virtualmake

this (in theory) should work the same way
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2004-06-26 14:58:29 UTC
fixed for 0.22.1 and 0.23.