Re: java dependency substvars and native compilation
On Wed, May 02, 2007 at 05:01:27PM +0100, Matthew Johnson wrote:
> On Wed May 02 16:54, Michael Koch wrote:
> > On Wed, May 02, 2007 at 03:15:39PM +0100, Matthew Johnson wrote:
> > > On Wed May 02 15:57, Michael Koch wrote:
> > > > On Wed, May 02, 2007 at 01:58:46PM +0100, Matthew Johnson wrote:
> > > > > Two subjects to this mail. Firstly, I had a go at writing a dh_javadeps
> > > > > which will search for jar files, find the classes they reference and
> > > > > find the packages they are in. This can be found at
> > > > > http://mjj29.matthew.ath.cx/dh_javadeps It updates $package.substvars so
> > > > > you can use ${java:Depends} in control files.
> > > >
> > > > Thats really nice to have. Unfortunately it didnt worked on a pretty
> > > > simple example for me.
> > >
> > > Hmm, could you let me know what the example was (it worked on my pretty
> > > simple example)
> >
> > I created debian/test and put ant.jar into it. Then I executed
> >
> > dh_javadeps -p test
> >
> > As output I got this:
> >
> > xargs: unmatched einfache quote; by default quotes are special to xargs
> > unless you use the -0 option
>
> Hmm, odd. I've just updated the one at that URL in case I rewrote it and
> the following works for me:
>
> mkdir -p debian/test
> cp /usr/share/java/ant-1.6.jar debian/test
> touch debian/control
> dh_javadeps -p test
> cat debian/test.substvars
Hmmm, I did exactly this. What I guess is that I have a lot of java
packages installed in /usr/share/java and the command lines become too
long for the shell script to handle.
> > I think about code paths that are only used when you use certain
> > features of a program. When the dependency itself has a long list of
> > depdencies it can make sense to not hardly depend on it when its only
> > needed/used by 0.1% of the users of a program.
>
> and you assume the program nicely handles this case? I think anything
> which causes the JVM to throw an exception failing to load a class
> requires a depends. (not that my code above does this, it's a bit of a
> hack and is likely to over-depend)
Yes. The code only throws an exception when its run. And its only run by
0.1% of the users. An entry in README.Debian is enough for such cases.
> > No, thats no bug. E.g. we ship different versions of the servlet
> > specification in Debian. ASM is another example. We have currently two
> > major versions in Debian. A third is coming soon. All have similar to
> > equal class names (with sometimes different APIs). Thats no bug. Thats
> > common practice in Java-land.
>
> Hmm, that feels totally wrong to me. Possibly a --prefer= parameter?
Thats normal business. When introducing a --prefer= switch thats like
hardcoding again. In such cases a helper doesnt really help. It just
causes additional work.
Cheers,
Michael
--
.''`. | Michael Koch <konqueror@gmx.de>
: :' : | Free Java Developer <http://www.classpath.org>
`. `' |
`- | 1024D/BAC5 4B28 D436 95E6 F2E0 BD11 5923 A008 2763 483B
Reply to: