Bug 223255 - app-portage/gentoolkit requires dev-lang/python to be built with thread support
Bug#: 223255 Product:  Gentoo Linux Version: 2007.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: tools-portage@gentoo.org Reported By: bluebird@gentoo.org
Component: Ebuilds
URL: 
Summary: app-portage/gentoolkit requires dev-lang/python to be built with thread support
Keywords:  InSVN
Status Whiteboard: 
Opened: 2008-05-22 20:31 0000
Description:   Opened: 2008-05-22 20:31 0000
If python is compiled with the nothreads USE-flag this error message occurs
when trying to use equery:

$ equery belongs /bin/bash
Traceback (most recent call last):
  File "/usr/bin/equery", line 24, in ?
    import gentoolkit
  File "/usr/lib/gentoolkit/pym/gentoolkit/__init__.py", line 28, in ?
    from threading import Lock
  File "/usr/lib/python2.4/threading.py", line 6, in ?
    import thread
ImportError: No module named thread

------- Comment #1 From Friedrich Oslage 2008-05-22 20:32:26 0000 -------
Created an attachment (id=153981) [details]
patch for gentoolkit ebuilds

------- Comment #2 From valli 2008-06-04 08:15:58 0000 -------
This patch isn't correct anymore.
The 'nothreads' USE flag disappeared in >= python-2.4.4-r10.
They introduced the 'threads' USE flag in python now.

...
if ! built_with_use 'dev-lang/python' 'threads' ; then
        eerror "dev-lang/python is missing thread support. Please add"
        eerror "'threads' to your USE flags, and re-emerge dev-lang/python."
        die "dev-lang/python needs thread support"
fi
...

------- Comment #3 From Paul Varner 2008-07-09 15:54:58 0000 -------
Created an attachment (id=159956) [details]
/usr/lib/gentoolkit/pym/gentoolkit/__init__.py

gentoolkit only requires thread support if it is used in a multi-threaded
application.  I've fixed it so that if you don't have threads enabled, it
defines a "null" Lock class.

$ svn commit -m "Fix gentoolkit to work without thread support in python. (Bug
223255)" ChangeLog src/gentoolkit/__init__.py
Sending        ChangeLog
Sending        src/gentoolkit/__init__.py
Transmitting file data ..
Committed revision 491.

------- Comment #4 From Paul Varner 2008-07-10 16:47:42 0000 -------
Released in gentoolkit-0.2.4_rc5.

------- Comment #5 From Michael A. Smith 2008-07-16 02:24:57 0000 -------
*** Bug 230021 has been marked as a duplicate of this bug. ***