Java packages, guidelines, ...

Ville Skyttä ville.skytta at iki.fi
Wed Mar 26 19:36:21 UTC 2008


On Wednesday 19 March 2008, Nicolas Mailhot wrote:
> Le mercredi 19 mars 2008 à 23:35 +0200, Ville Skyttä a écrit :
> > On Tuesday 18 March 2008, Nicolas Mailhot wrote:
> > >
> > > This is documented in the jpackage-utils package we've been shipping
> > > for years, and this documentation is already referenced in the
> > > "incomplete" java guidelines.
> >
> > Could you cite the part of the documentation that provides rationale for
> > this?
>
> The rationale is sort of implicit in the documentation that's true.
>
> > I have never grokked it, the docs just say "you shall do this" but don't
> > give a reason at least in the form I would understand.
>
> The reason is just that jpackage-utils is just a pile of dumb scripts
> doing sed-s on find-s in a few directories, and build-classpath jaf
> works because there is a jaf.jar symlink on the filesystem.
>
> >   IMNSHO the versioning
> > should be dropped and only the unversioned jars installed.
>
> Feel free to add smarts to the scripts.

Maybe I'm thick, but I still don't understand the need for the versioned ones 
or exactly what smarts you're talking about.

find_jar in java-functions falls back to unversioned jar if it can't find the 
requested versioned jar [0], so not even things that do "find-jar foo-1.2.3" 
would break if foo-1.2.3.jar would not be there but foo.jar would.

Because installing multiple packages that own the same versionless symlink 
pointing to different files would result in a conflict, we can't really do it 
anyway.  And if a package requires a specific version of some other, it'd 
need to have a versioned dependency in place in all cases - using the version 
in find-jar and friends' arguments does not seem to add any value to me.  
Actually on the contrary: it just adds one more thing that can break.

What am I still missing?  If something, could you provide specific examples?


[0] Well, except that it doesn't, a sed in find_jar is not working as clearly 
intended, this needs to be fixed in jpackage-utils:
    $ echo foo-1.0.0 | sed 's+-[\.[:digit:]]\+$++g'
    foo-1.0.0
But:
    $ echo foo-1.0.0 | sed 's/-[\.[:digit:]]\+$//g'
    foo




More information about the fedora-devel-list mailing list