Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166077 - java packages depending on dev-java/ant fail to emerge without --deep if dev-java/ant-tasks is not installed
Summary: java packages depending on dev-java/ant fail to emerge without --deep if dev-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 168128 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-02-09 14:17 UTC by kiorky
Modified: 2007-02-24 00:50 UTC (History)
2 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 kiorky 2007-02-09 14:17:26 UTC
I failed to merge tomcat with as error:
/usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/build/build/webapps/tomcat-docs
/images
     [copy] Copying 10 files to /usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/build/build/webapps/tomc
at-docs/images
    [mkdir] Created dir: /usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/build/build/webapps/tomcat-docs
/printer
    [style] Warning: the task name <style> is deprecated. Use <xslt> instead.
    [style] java.lang.ClassNotFoundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison
    [style]     at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    [style]     at java.security.AccessController.doPrivileged(Native Method)
    [style]     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    [style]     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    [style]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    [style]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    [style]     at java.lang.Class.forName0(Native Method)
    [style]     at java.lang.Class.forName(Class.java:141)
    [style]     at org.apache.tools.ant.taskdefs.XSLTProcess.loadClass(XSLTProcess.java:548)
    [style]     at org.apache.tools.ant.taskdefs.XSLTProcess.getLiaison(XSLTProcess.java:785)
    [style]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [style]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [style]     at java.lang.reflect.Method.invoke(Method.java:324)
    [style]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [style]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [style]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [style]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [style]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [style]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [style]     at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [style]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [style]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [style]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [style]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [style]     at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [style]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    [style]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [style]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [style]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [style]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [style]     at java.lang.reflect.Method.invoke(Method.java:324)
    [style]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    [style]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [style]     at org.apache.tools.ant.Target.execute(Ta.java:348)
    [style]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [style]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [style]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    [style]     at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    [style]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [style]     at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    [style]     at org.apache.tools.ant.Main.runBuild(Main.java:698)
    [style]     at org.apache.tools.ant.Main.startAnt(Main.java:199)
    [style]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    [style]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

BUILD FAILED
/usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/build.xml:43: The following error occurred while executi
ng this line:
/usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/build/build.xml:655: The following error occurred while
executing this line:
/usr/local/tmp/portage/www-servers/tomcat-5.5.20-r8/work/apache-tomcat-5.5.20-src/container/webapps/docs/build.xml:83: java.lang.ClassNotF
oundException: org.apache.tools.ant.taskdefs.optional.TraXLiaison

Total time: 56 seconds

!!! ERROR: www-servers/tomcat-5.5.20-r8 failed.

Solution:
emerge -1 dev-java/ant-trax 

So, Tomcat needs a dependency to dev-java/ant-trax with ant 1.7.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-09 14:55:26 UTC
tomcat-5.5.20-r8 is not split-ant aware. It depends on full dev-java/ant which pulls in dev-java/ant-tasks which (unless you specify "noxalan" in it's USE) pulls dev-java/ant-trax. So I don't see how might this happen. Maybe you run arch and didn't keyword dev-java/ant-tasks and dev-java/ant properly? But then you should be getting upgrade/downgrade loops.
Comment 2 kiorky 2007-02-09 15:22:59 UTC
uhm, on this box, i ve just realized that ant-tasks was even not installed O.o. 
To continue, i share the keywords/use with others boxes where i ve allready upgraded to split-ant recently. 

But,i have some doubts... emerge should have told me to install ant-tasks as a dependency to tomcat (and so ant-trax as a dependency of ant-tasks) when i ve emerged it , shouldn't it ?
Comment 3 kiorky 2007-02-09 17:47:54 UTC
So, i think this is more a "user" problem now that i figured out some things  with wltjr. Anyway, maybe sort of safeguard can be done in case.

To clarify things, i point a way to reproduce this thing:
1. share keywords/use with 2 or more boxes
2. keyword dev-java/ant and related stuff to get split-ant on one of those box
3. Check out the new keywords/use on another box
4. Try to emerge tomcat WITHOUT upgrading to split-ant before
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-09 21:58:56 UTC
(In reply to comment #3)
> 4. Try to emerge tomcat WITHOUT upgrading to split-ant before

This doesn't explain why it happened, even without split-ant portage should make sure that deps are satisfied, be it split-ant or old monolithic ant-tasks. So either portage failed to bring the deps or ant-tasks were missing the jar. Or you also shared something else than keywords/use which fooled portage into thinking something's already installed while it wasn't... Hard to say unless you know what versions of ant-core, ant-tasks and ant were installed at the time.
Comment 5 kiorky 2007-02-10 09:25:45 UTC
ant and ant-core were 1.6.5 and ant-tasks was not installed.
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-10 16:51:06 UTC
That can happen if you
a) emerge ant with --nodeps, so it won't pull ant-tasks
b) emerge -C ant-tasks after ant is installed

Looks like emerge will check only direct dep (ant) of tomcat, not indirect (ant-tasks) unless you use --deep. Guess it has always been like this... Closing this bug, if you want to fill a bug for portage, go ahead (and looks out for dupes).
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2007-02-10 16:56:23 UTC
(In reply to comment #6)
> 
> Looks like emerge will check only direct dep (ant) of tomcat, not indirect
> (ant-tasks) unless you use --deep. Guess it has always been like this...
> Closing this bug, if you want to fill a bug for portage, go ahead (and looks
> out for dupes).
> 

Yes Portage does not do deep resolution by default, but will do so in the future. It's your problem if you go manually do emerge -C ant-tasks.
Comment 8 kiorky 2007-02-10 17:48:54 UTC
Yes, as i said in #3. For me, it s a normal behaviour.

I just said that maybe a safeguard could be added to tomcat...

So, sure close the bug!
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-24 00:09:47 UTC
*** Bug 168128 has been marked as a duplicate of this bug. ***
Comment 10 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-24 00:14:38 UTC
I think this can happen mostly when user unmerges old ant-tasks because of the block, to be able to install new ant-core, but dev-java/ant is left installed, and then tries to emerge something depending on dev-java/ant, without prior --deep --update world.
There's not much we can do, except adding also a !<dev-java/ant-1.7.0 block to ant-core-1.7.0, which would force people to unmerge both old ant-tasks and ant, and dev-java/ant dependency would then pull it back without --deep.
Comment 11 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-02-24 00:50:17 UTC
Block added. Marking fixed since other cases of this could be only user unmerging ant-tasks without being pushed to do so by block, and can't do much about that.