Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553392 - dev-java/fop-2.0 fails to merge
Summary: dev-java/fop-2.0 fails to merge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-27 05:56 UTC by Petr Pisar
Modified: 2015-06-28 04:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed fixes to dev-java/fop-2.0.ebuild (fop-2.0.ebuild.patch,854 bytes, patch)
2015-06-27 06:08 UTC, Petr Pisar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisar 2015-06-27 05:56:46 UTC
I have two issues with dev-java/fop-2.0:

(1) If building with USE=jai, it will fail on resolving classpath:

 * ERROR: dev-java/fop-2.0::gentoo failed (compile phase):
 *   java-config --classpath=,sun-jai-bin failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3941:  Called java-pkg-2_src_compile
 *   environment, line 1861:  Called eant 'package' '-f' 'build.xml' '-Djce.present=true' '-Djai.present=true' '-Dhyphenation.present=true' '-Duser.hyph.dir=/usr/share/offo-hyphenation/hyph/'
 *   environment, line  645:  Called java-pkg_getjars ',sun-jai-bin'
 *   environment, line 2571:  Called die
 * The specific snippet of code:
 *       [[ $? != 0 ]] && die "java-config --classpath=${pkgs} failed";

I think this is because EANT_GENTOO_CLASSPATH should be space-delimited list and the ebuild file does:

EANT_GENTOO_CLASSPATH="
    ant-core
    batik-1.8
    fontbox-1.7
    commons-io-1
    commons-logging
    servlet-api-3.0
    avalon-framework-4.2
    xmlgraphics-commons-2
    xml-commons-external-1.3
"
[...]
use jai && EANT_EXTRA_ARGS+=" -Djai.present=true" && EANT_GENTOO_CLASSPATH+=",sun-jai-bin"

Replacing the comma with a space fixes the issue for me.

(2) If dev-java/fop-1.1:0 is installed, updating the fop will fail because dev-java/fop-1.1 and dev-java/fop-2.0 have different slot, but not all of their files have unique names:

 * Detected file collision(s):
 * 
 *      /usr/bin/fop
 *      /usr/share/fop/hyph/readme
 *      /usr/share/fop/hyph/hyphenation.dtd
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * dev-java/fop-1.1:0::gentoo
 *      /usr/bin/fop
 *      /usr/share/fop/hyph/hyphenation.dtd
 *      /usr/share/fop/hyph/readme
 * 
 * Package 'dev-java/fop-2.0' NOT merged due to file collisions.

Either the three files should be renamed, or the two ebuilds should conflict.
Comment 1 Petr Pisar 2015-06-27 06:08:16 UTC
Created attachment 405826 [details, diff]
Proposed fixes to dev-java/fop-2.0.ebuild
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-06-27 07:03:00 UTC
(In reply to Petr Pisar from comment #0)
>  * Package 'dev-java/fop-2.0' NOT merged due to file collisions.
> 
> Either the three files should be renamed, or the two ebuilds should conflict.

Or 2.0 should be in the same SLOT.
Comment 3 Patrice Clement gentoo-dev 2015-06-27 13:05:02 UTC
Thanks for nailing down the problem Petr. @jer: It can't be in the same slot cause it has a different API. I've come up with a better fix to work around the issue instead of setting a blocker on fop:0.

-       if use hyphenation ; then
+       if use hyphenation; then
                java-pkg_dojar build/fop-hyph.jar
-               insinto /usr/share/${PN}/
+               insinto /usr/share/${P}/
                doins -r hyph
        fi
 
        # Doesn't support everything upstream launcher does...
-       java-pkg_dolauncher ${PN} --main org.apache.fop.cli.Main
+       java-pkg_dolauncher ${P} --main org.apache.fop.cli.Main

I've also included your patch wrt sun-jai-bin.

+  27 Jun 2015; Patrice Clement <monsieurp@gentoo.org> fop-2.0.ebuild:
+  Make use of ${P} where we can in order to avoid clashing with other SLOTs. Fix
+  bug 553392.
+

Give it another try and let us know.
Comment 4 James Le Cuirot gentoo-dev 2015-06-27 16:05:46 UTC
${PN}-${SLOT} would be tidier, this is what the Java eclasses already use and having something like /usr/bin/fop-2.1.3 would be weird.
Comment 5 Patrice Clement gentoo-dev 2015-06-27 18:49:01 UTC
Index: fop-2.0.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-java/fop/fop-2.0.ebuild,v
retrieving revision 1.5
diff -u -B -r1.5 fop-2.0.ebuild
--- fop-2.0.ebuild      27 Jun 2015 17:53:42 -0000      1.5
+++ fop-2.0.ebuild      27 Jun 2015 18:44:58 -0000
@@ -22,6 +22,8 @@
 LICENSE="Apache-2.0"
 SLOT="2"
 
+MY_P="${PN}-${SLOT}"
+
 # Doesn't work with java.awt.headless, requires Mockito.
 RESTRICT="test"
 
@@ -108,12 +110,12 @@
 
        if use hyphenation; then
                java-pkg_dojar build/fop-hyph.jar
-               insinto /usr/share/${P}/
+               insinto /usr/share/${MY_P}/
                doins -r hyph
        fi
 
        # Doesn't support everything upstream launcher does...
-       java-pkg_dolauncher ${P} --main org.apache.fop.cli.Main
+       java-pkg_dolauncher ${MY_P} --main org.apache.fop.cli.Main

+  27 Jun 2015; Patrice Clement <monsieurp@gentoo.org> fop-2.0.ebuild:
+  Use a combination of ${PN}-${SLOT} instead of ${P} courtesy of James Le Cuirot
+  <chewi@gentoo.org>. Fix bug 553392.
+

Thanks for the heads up.
Comment 6 Petr Pisar 2015-06-28 04:39:20 UTC
Thanks. It works for me.