Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131141 - dev-java/xerces USE="-examples" should not install xercesSamples.jar
Summary: dev-java/xerces USE="-examples" should not install xercesSamples.jar
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:
Depends on:
Blocks:
 
Reported: 2006-04-24 13:17 UTC by Hanno Zysik (geki)
Modified: 2006-09-18 14:25 UTC (History)
1 user (show)

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


Attachments
only install xercesSamples.jar if examples flag is set (examplesflag.patch,377 bytes, patch)
2006-08-02 22:35 UTC, Andrew Yates
Details | Diff
examples patch (examples2.patch,258 bytes, patch)
2006-08-02 22:47 UTC, Andrew Yates
Details | Diff
use jar target (target.patch,487 bytes, patch)
2006-08-03 10:37 UTC, Andrew Yates
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Zysik (geki) 2006-04-24 13:17:39 UTC
Something like
  'use examples || rm ${S}/build/xercesSamples.jar'
in src_install before java-pkg_dojar.
Comment 1 Andrew Yates 2006-08-02 22:34:30 UTC
I'm attaching a patch so that xercesSamples.jar is not installed into /usr/share/xerces-2/lib when the examples use flag is not set. The patch is against the xerces 2.7.1-r1 ebuild in portage. I've tested it, and the change also works with the java experimental 2.8.0 ebuild.
Comment 2 Andrew Yates 2006-08-02 22:35:15 UTC
Created attachment 93313 [details, diff]
only install xercesSamples.jar if examples flag is set
Comment 3 Andrew Yates 2006-08-02 22:47:50 UTC
Created attachment 93314 [details, diff]
examples patch

I realized there was a better way to do this as soon as I submitted the last patch.
This removes the samples jar file earlier in the build process. There's no reason to wait until the samples jar is in image before removing it.
Comment 4 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-03 02:17:30 UTC
Thanks for your attempt. However, compiled examples should never go to /usr/share/package/lib through java-pkg_dojar, no matter the useflag. Examples source should go to /usr/share/doc/${PF}/examples as the ebuild does, and compiled examples are probably of no use so the jar can just be removed in any case. Ideally it wouldn't even have to be built, that would probably require some manual build.xml patching or finding a better target(s) to pass to eant.
Comment 5 Andrew Yates 2006-08-03 08:27:15 UTC
You're right.
     [echo]  jar      --> generates the xercesImpl.jar file
     [echo]  jars --> generates xercesImpl & xercesSamples jars
It looks like we can change the build target to 'jar' and we won't have to deal with the samples jar. As you mentioned, a binary examples jar isn't that useful anyway. 
The jars target builds three files: xercesImpl.jar, xercesSamples.jar and xml-apis.jar. The jar target only builds xercesImpl.jar.
xml-commons-external already provides xml-apis.jar, but according to Bug #82561 removing the jar from xerces will break some ebuilds. Those will have to be fixed before the target can be changed.
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-03 08:45:31 UTC
(In reply to comment #5)
> You're right.
>      [echo]  jar      --> generates the xercesImpl.jar file
>      [echo]  jars --> generates xercesImpl & xercesSamples jars
> It looks like we can change the build target to 'jar' and we won't have to deal
> with the samples jar. As you mentioned, a binary examples jar isn't that useful
> anyway. 

Yeah.

> The jars target builds three files: xercesImpl.jar, xercesSamples.jar and
> xml-apis.jar. The jar target only builds xercesImpl.jar.
> xml-commons-external already provides xml-apis.jar, but according to Bug #82561
> removing the jar from xerces will break some ebuilds. Those will have to be
> fixed before the target can be changed.
 
Well the jars target just copies the xml-apis.jar from one dir to another. It's taken from xml-commons-external, not built here. So the ebuild could just copy it itself (until bug 82561 is solved and this copying is no more needed) and then jar target would be enough, without building the samples.
Comment 7 Andrew Yates 2006-08-03 10:37:11 UTC
Created attachment 93356 [details, diff]
use jar target

This uses the jar target so that the samples are not built, and installs a symlink so that xerces-2/lib/xml-apis.jar points to the xml-commons-external jar that was used in building xerces.
Comment 8 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-08 18:34:47 UTC
Fixed in 2.8.0-r1 in migrated-java-experimental-overlay.
Comment 9 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-18 14:25:02 UTC
Fixed in xerces-2.7.1-r2 in the tree. Thanks everyone.