Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223255 - app-portage/gentoolkit requires dev-lang/python to be built with thread support
Summary: app-portage/gentoolkit requires dev-lang/python to be built with thread support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 230021 (view as bug list)
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2008-05-22 20:31 UTC by Friedrich Oslage (RETIRED)
Modified: 2008-07-16 02:24 UTC (History)
1 user (show)

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


Attachments
patch for gentoolkit ebuilds (gentoolkit-check-for-thread-support.patch,5.04 KB, patch)
2008-05-22 20:32 UTC, Friedrich Oslage (RETIRED)
Details | Diff
/usr/lib/gentoolkit/pym/gentoolkit/__init__.py (__init__.py,1.38 KB, text/plain)
2008-07-09 15:54 UTC, Paul Varner (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich Oslage (RETIRED) gentoo-dev 2008-05-22 20:31:54 UTC
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 Friedrich Oslage (RETIRED) gentoo-dev 2008-05-22 20:32:26 UTC
Created attachment 153981 [details, diff]
patch for gentoolkit ebuilds
Comment 2 valli 2008-06-04 08:15:58 UTC
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 Paul Varner (RETIRED) gentoo-dev 2008-07-09 15:54:58 UTC
Created attachment 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 Paul Varner (RETIRED) gentoo-dev 2008-07-10 16:47:42 UTC
Released in gentoolkit-0.2.4_rc5.
Comment 5 michael@smith-li.com 2008-07-16 02:24:57 UTC
*** Bug 230021 has been marked as a duplicate of this bug. ***