Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339075 - dev-java/java-config doesn't work: wrapper scripts cause modules not to be found
Summary: dev-java/java-config doesn't work: wrapper scripts cause modules not to be found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 06:17 UTC by Fabian Groffen
Modified: 2010-10-24 21:08 UTC (History)
3 users (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 Fabian Groffen gentoo-dev 2010-09-29 06:17:44 UTC
% time java-config
Traceback (most recent call last):
  File "/Library/Gentoo/usr/bin/java-config-2-2.6", line 4, in <module>
    import os
  File "/Library/Gentoo/usr/lib/python2.6/os.py", line 49, in <module>
    import posixpath as path
  File "/Library/Gentoo/usr/lib/python2.6/posixpath.py", line 16, in <module>
    import warnings
  File "/Library/Gentoo/usr/lib/python2.6/warnings.py", line 6, in <module>
    import linecache
ImportError: No module named linecache
6.405u 20.203s 0:33.85 78.5%    0+0k 0+9io 0pf+0w

(20 seconds wait with 100% cpu usage)

% time java-config-2-2.6-2.7
Usage: java-config [options]

Java Configuration Utility Version 2.1.11
[snip options]
0.111u 0.315s 0:00.63 66.6%     0+0k 0+9io 0pf+0w

(just 0.315 seconds, immediate response)

java-config is a bash wrapper script to call java-config-2, which is a python wrapper script to call java-config-2-2.6, which in turn is a python wrapper script to call java-config-2-2.6-2.7.

It seems that calling a python wrapper script from a python wrapper script makes something go wrong, and modules not to be found (import os for sure works).  Manually importing linecache works fine also.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-09-29 17:17:06 UTC
I can't reproduce this problem. I have just reinstalled dev-java/java-config and dev-java/java-config-wrapper and I still have only the following files:
  /usr/bin/java-config (bash wrapper script)
  /usr/bin/java-config-2 (Python wrapper script)
  /usr/bin/java-config-2-2.6 (Python target script)
  /usr/bin/java-config-2-2.7 (Python target script)
  /usr/bin/java-config-2-3.1 (Python target script)
  /usr/bin/java-config-2-3.2 (Python target script)

I don't have any java-config-2-2.6-2.7 file. What creates this file?
Comment 2 Fabian Groffen gentoo-dev 2010-09-29 17:31:21 UTC
That may be the source of the problem then.  According to portage it's generated by the package, so I expect the eclass.

I'll check if there's any eclass out of date, but iirc, all those eclasses are already in gx86
Comment 3 Fabian Groffen gentoo-dev 2010-09-29 18:00:58 UTC
I added an einfo in distutils.eclass at line 314 (before the move in after the nonversioned_file loop, and this happens:

 * renaming depend-java-query to depend-java-query-2.7
 * renaming depend-java-query-2.6 to depend-java-query-2.6-2.7
 * renaming gjl to gjl-2.7
 * renaming gjl-2.6 to gjl-2.6-2.7
 * renaming java-config-2 to java-config-2-2.7
 * renaming java-config-2-2.6 to java-config-2-2.6-2.7

so it seems the expressions don't match here on this system.

% bash --version
GNU bash, version 4.1.7(2)-release (powerpc-apple-darwin8)

the head -n1 of depend-java-query is
#!/Library/Gentoo/usr/bin/python2.6 -E
Comment 4 Fabian Groffen gentoo-dev 2010-09-29 18:19:06 UTC
I have this in my make.conf:

USE_PYTHON="2.6 2.7"

is that correct?
Comment 5 Fabian Groffen gentoo-dev 2010-09-30 12:30:40 UTC
Arfrever, please commit your fix from yesterday, this is breaking stuff badly!!!
Comment 6 Fabian Groffen gentoo-dev 2010-10-03 16:41:14 UTC
arfrever, I don't understand.

You have shown me a patch in IRC that solves the issue, you agreed that it was a bug in the eclass, yet you don't commit the fix.

This is breaking my (and others their) systems, and the time that goes over this is unreasonable.  I feel forced to add devrel to Cc of this bug.
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-10-03 17:07:03 UTC
Fabian,

I'm CC'ing QA as this seems a QA issue, not a devrel issue. In any case, Arfrever has been asked to have all of his proposed eclass changes reviewed by QA, so he might just be waiting for a review.

Arfrever,

can you shed some light into what's going on?
Comment 8 Fabian Groffen gentoo-dev 2010-10-03 17:44:11 UTC
I Cc-ed due to the explicit request by betelgeuse in his email to -core.

If the eclass change is hold back due to QA review, then that would be a plausible explanation for the wait, though I'd have expected that to be mentioned here after comment #5.
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-03 20:07:56 UTC
I had been busy with a security bug and other bugs. I have sent the patches.
Comment 10 SpanKY gentoo-dev 2010-10-03 20:15:35 UTC
why is this java-config bug assigned to python ?
Comment 11 Petteri Räty (RETIRED) gentoo-dev 2010-10-05 19:40:33 UTC
(In reply to comment #10)
> why is this java-config bug assigned to python ?
> 

As far as I see it's caused by python eclasses (our tools are mostly python).
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-10-24 21:08:38 UTC
This bug was fixed some weeks ago.