Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 563438 - dev-java/log4j-1.2.17-r2 broken classpath/depend
Summary: dev-java/log4j-1.2.17-r2 broken classpath/depend
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-18 18:18 UTC by William L. Thomson Jr.
Modified: 2015-10-18 18:57 UTC (History)
0 users

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 William L. Thomson Jr. 2015-10-18 18:18:00 UTC
Should be oracle-javamail, not just javamail. Seems to have broken when ever it was changed from java-virtual/javamail to just dev-java/oracle-javamail.

CDEPEND="javamail? (
                        dev-java/oracle-javamail:0
                        java-virtuals/jaf:0
                )


src_compile() {
        if use javamail; then
                EANT_GENTOO_CLASSPATH+="javamail,jaf"
                EANT_EXTRA_ARGS+=" -Djavamail-present=true"
        fi


 * Disabling all optional ANT_TASKS
^[[01m^[[31;06m!!! ERROR: Package javamail was not found!^[[0m
 * ERROR: dev-java/log4j-1.2.17-r2::gentoo failed (compile phase):
 *   java-config --classpath=javamail,jaf failed
Comment 1 Patrice Clement (RETIRED) gentoo-dev 2015-10-18 18:57:32 UTC
monsieurp@epsilon ~/gentoo/dev-java/log4j $ diff -u log4j-1.2.17-r2.ebuild log4j-1.2.17-r3.ebuild
--- log4j-1.2.17-r2.ebuild      2015-10-16 09:16:54.932486000 +0000
+++ log4j-1.2.17-r3.ebuild      2015-10-18 18:52:07.169486000 +0000
@@ -46,7 +46,7 @@
 
 src_compile() {
        if use javamail; then
-               EANT_GENTOO_CLASSPATH+="javamail,jaf"
+               EANT_GENTOO_CLASSPATH+="oracle-javamail,jaf"
                EANT_EXTRA_ARGS+=" -Djavamail-present=true"
        fi
        if use jms; then

Resulting jar:

monsieurp@epsilon ~/gentoo/dev-java/log4j $ jar tf /var/tmp/portage/dev-java/log4j-1.2.17-r3/image/usr/share/log4j/lib/log4j.jar | grep -i smtp                              
org/apache/log4j/net/SMTPAppender$1.class
org/apache/log4j/net/SMTPAppender.class

commit fd4e502 (HEAD, master)
Author: Patrice Clement <monsieurp@gentoo.org>
Date:   Sun Oct 18 18:55:36 2015 +0000

    dev-java/log4j: Mend classpath when using javamail and swap javamail with oracle-javamail. Fixes bug 563438.
    
    Package-Manager: portage-2.2.20.1
    Signed-off-by: Patrice Clement <monsieurp@gentoo.org>

 create mode 100644 dev-java/log4j/log4j-1.2.17-r3.ebuild