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

Re: ldconfig



On Mon, Apr 23, 2001 at 02:02:20AM +0200, Robert Bihlmeyer wrote:
> Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:
> 
> > They should be maintained by dpkg. If they aren't, it's a bug.
> 
> Yes, the symlinks should be in the deb. But how do they get there
> during package building?

Normally they are created by the upstream software. libtool creates them.

> A maintainer can either create them in the staging directory
> via "ln -s", but then she has to remember to keep the soname
> up-to-date in this command. Or she uses an automatic method: "ldconfig
> -n" or a reimplementation of the same functionality.

Use of ldconfig is not portable. We should not encourage maintainers into
Linux specific programming.

> I think using "ldconfig -n" is the right thing. It should be supported.

It is the right thing on Linux (and BSD) for runtime management of shared
libraries. It is not the right thing to use when building from a portable
source.

> Sure, the cache-rebuilding part of ldconfig is of no use on the Hurd.
> But the link-generating part is useful and needed.

I don't disagree, but the most convenient solution on one platform is not
always the correct approach to a problem.

> > > FWIW, I've seen packages generate the symlinks in debian/$PKG/usr/lib
> > > with the help of "ldconfig -n". These will silently break when built
> > > on the Hurd.
> > 
> > This is a bug in the package then (it's a policy violation last time I
> > checked).
> 
> I can't find anything in policy that forbids this.

Sorry, I misunderstood you. I was thinking you talked about postinst files
(obviously I was not reading carefully enough).

It's still a bug since the package won't build correctly on the Hurd.

> I'd rather we had the following ldconfig. It would at least not break
> assumptions *silently*:
> 
> #!/bin/sh
> 
> # simple "ldconfig" calls succeed silently for the sake of postinsts
> [ $# -eq 0 ] && exit 0
> 
> # other invocations suggest special needs that we can't fullfil
> echo We have no real ldconfig.
> exit 1

That's an idea. Can you submit it as a bug report against libc0.2 (or
whatever contains ldconfig now)?

Thanks,
Marcus



Reply to: