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

Re: Symbols/shlibs files for Java



Hi Niels,

On Wed, 25 May 2011, Niels Thykier wrote:
> First of all I was hoping that you might have some "Do" or "Don't"
> pointers from when dpkg added support for these things.

Do not underestimate the task. Apart from that, I'm sorry I'm not sure
what kind of advice I can give you. :-)

> Secondly, there might be some code or infrastructure that could be
> shared.

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.

>   Particularly I am interested in how you handle mapping
> filenames/SONAMES to a package (especially in cases like libc6, where
> there more than one lib in the package).

There's nothing magical here. Once we have a SONAME, we find the library
on the system (using the same path that ld.so would use). Once we have
the complete filename, dpkg -S /the/file returns the package name. And
with the package name we're checking the content of
/var/lib/dpkg/info/<pkg>.shlibs (but you have to use dpkg-query
--control-path <pkg> shlibs to find that path).

>   We also have cases where two packages provide the same library and it
> would be optimal for us to end up with libX-java | libY-java in the
> depends, but I have a feeling that is not entirely trivial to support
> (in a sane way).

Well, both packages need to provide this dependency. There's no way the
system can know that there is some other libraries that could fulfill the
same role and that it needs to put an alternative in the dependency.

> I intend to have all the tools to support this in the javahelper
> package.  I am not too sure that we can recycle the existing formats
> (maybe the shlibs format with s/SONAME/filename/) as we have to check
> for things like classes, return-types, inheritance and method
> overloading as well.  But feel free to correct me if symbols files
> already have support for this.

Sorry, I have too few java knowledge to answer this.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

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


Reply to: