[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Symbols/shlibs files for Java



On Mon, 30 May 2011, Niels Thykier wrote:
> > I would love to generalize the principle of auto-generated dependencies
> > to cover more than just C libraries but we're far from that, i.e. there's
> > no infrastructure in place for this and all the code in dpkg-gensymbols
> > and dpkg-shlibdeps is highly specific to the case of C libraries/binaries.
> 
> Could we begin refactoring this towards something similar to the
> $NS::Source::Package setup (e.g. $NS::SymbolsFile::$LANG)? Or would you
> rather see a different approach to this code-wise

Well, I see the first abstraction higher in the stack: I would like to see
a dpkg-autodeps. It would call dpkg-shlibdeps as one of the way to obtain
relevant dependencies for the package being built, but it would also allow
other package to provides supplementary scripts in /usr/lib/dpkg/autodeps/
in order to deal with other cases where dependencies can be automatically
generated.

In other words, you should not even have to explicitly call your java
helper tool. It would be automatically used.

But of course, if some of those helpers tools are very similar to
dpkg-shlibdeps/dpkg-gensymbols, then I'm entirely open to make the
Dpkg::Shlibs:: API more generic.

> ... and if I discard my desire to record all access qualifiers and such,
> I think the symbols file is mostly re-usable if we encode things right.

It would be interesting indeed. But I fear there's always going to be
cases where the mapping will be difficult.

For example, what if a method moves from public to protected?

And I have the feeling that with java you often modify the
search path for jar, so that mapping dependencies for a java program at
build time does not mean that at run time it will use the same set of
jars... (the same applies to C but it's much less common to have lots of
private libraries that are copies/forks of other libraries).

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)


Reply to: