Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 274479

Summary: dev-java/commons-codec-1.3-r2 - ImportError: No module named _elementtree
Product: Gentoo Linux Reporter: MT <toffanin.mauro>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: enhancement CC: java
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: commons-codec-1.3-r2.ebuild.patch

Description MT 2009-06-17 09:19:04 UTC
During compilation of dev-java/commons-codec-1.3-r2 I get this error:

cElementTree rewriter                                                          
Traceback (most recent call last):                                             
  File "/usr/lib/javatoolkit/bin/build-xml-rewrite", line 4, in <module>       
    import xml.etree.cElementTree as et                                        
  File "/usr/lib/python2.5/xml/etree/cElementTree.py", line 3, in <module>     
    from _elementtree import *                                                 
ImportError: No module named _elementtree

The compilation fails because the package requires python's library: _elementtree.so, which is provided by package dev-lang/python with USE 'xml' enabled (see bug 235650); the problem here is the ebuild of dev-java/commons-codec that do not check dependencies USE, so I have made a little enhancements to the ebuild (see attachment). Please review my ebuild patch, I hope it will be useful.

p.s.: fixed also copyright header and use EAPI2 syntax;

Reproducible: Always
Comment 1 MT 2009-06-17 09:21:18 UTC
Created attachment 194969 [details, diff]
commons-codec-1.3-r2.ebuild.patch
Comment 2 Alistair Bush (RETIRED) gentoo-dev 2009-06-17 11:02:07 UTC

*** This bug has been marked as a duplicate of bug 261218 ***