Take the commons-httpclient-3.0_rc1 ebuild for instance. It rdepends on commons-logging and log4j. This is wrong. commons-logging is chosen so that applications using commons-httpclient can decide which logging framework to use. This decision must not be made on the library level! Reproducible: Always Steps to Reproduce:
Created attachment 64292 [details] commons-httpclient-3.0_rc1.ebuild Fixed ebuild
It is better to provide patches against the latest ebuild in the future, but thank you for the report.
I did a little shell magic to get a list of packages that depend on both: In PORTDIR: grep -l --include=*.ebuild -r dev-java/commons-logging * | xargs grep -l dev-java/log4j dev-java/mx4j/mx4j-2.1.0-r1.ebuild dev-java/commons-logging/commons-logging-1.0.4-r1.ebuild dev-java/castor/castor-0.9.5.3-r1.ebuild dev-java/castor/castor-0.9.7.ebuild dev-java/castor/castor-0.9.9.ebuild dev-java/exolabcore/exolabcore-0.3.7_p20050205.ebuild dev-java/commons-httpclient/commons-httpclient-2.0.2.ebuild dev-java/commons-httpclient/commons-httpclient-2.0.1.ebuild dev-java/ant-tasks/ant-tasks-1.6.5.ebuild dev-java/ant-tasks/ant-tasks-1.6.2-r10.ebuild dev-java/ant-tasks/ant-tasks-1.6.2-r9.ebuild dev-java/openjms/openjms-0.7.6.1-r1.ebuild dev-java/xdoclet/xdoclet-1.2.2.ebuild dev-java/jgroups/jgroups-2.2.7-r1.ebuild dev-java/jgroups/jgroups-2.2.7.ebuild net-nds/jxplorer/jxplorer-3.1_rc4.ebuild net-nds/jxplorer/jxplorer-3.1.ebuild www-servers/axis/axis-1.2_rc2.ebuild www-servers/tomcat/tomcat-5.0.28-r10.ebuild www-servers/tomcat/tomcat-5.0.28-r9.ebuild www-servers/tomcat/tomcat-5.0.28-r11.ebuild
Keep in mind that this bug *only* affects libraries and *not* standalone products. So for Tomcat, Axis and Jxplorer for example it is totally correct to depend on both.
(In reply to comment #4) > Keep in mind that this bug *only* affects libraries and *not* standalone > products. So for Tomcat, Axis and Jxplorer for example it is totally correct to > depend on both. Of course. I had meant to mention that, but it was a bit late when I commented. Fixed the rest of commons-httpclient, mx4j, exolabcore, jgroups, and axis. In addition to tomcat and jxplorer, xdoclet, ant-tasks, and openjms actually need log4j. Also, obviously commons-logging should depend on log4j ;) Thanks for reporting!
Take for example dev-java/poi. You can't just go removing dependencies: compile-contrib: [javac] Compiling 21 source files to /var/tmp/portage/poi-2.5.1/work/build/contrib-classes [javac] /var/tmp/portage/poi-2.5.1/work/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFRegionUtil.java:19: package org.apache.log4j does not exist [javac] import org.apache.log4j.Category; It does compile because of the LOCALCLASSPATH in /usr/bin/ant. Please turn that off while removing log4j dependencies.