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

Re: ldconfig in postinst



On Mon, Sep 03, 2001 at 08:44:40PM +1000, Drew Parsons wrote:
> My package meschach has a shared library.  Previously, I called ldconfig in
> the postinst to get the library registered (it was made mandatory in Policy
> 2.4.1.0).
> 
> But I've noticed just now as I prepare a new upload that lintain complains,
> saying,
> 
> W: meschach: postinst-has-useless-call-to-ldconfig
> 
> So I'm a bit confused about what the problem is, especially since the
> directive in Policy 2.4.1.0 doesn't appear to have been annulled.
> 
it is useless to call ldconfig if you don't install any shared library in paths
which ldconfig look for libraries in, right? so lintian does this check to prevent
useless calls to ldconfig, maybe this help you understanding you are not installing
libraries where maybe you are expecting them to be installed (which maybe are right
the paths scanned by ldconfig).

anyway there was a bug (#109721) and lintian reported this warning even if you
were effectively installing libraries in ldconfig path. this bugs has been solved
and upgrading to newer versions of lintian should make you less confused :((

remember also to call ldconfig in postrm only with "remove" argument (see policy
chapter 9)

> (and do I need to put dpkg-shlibdeps in debian/rules somewhere?  It seems
> fine without it)
> 
yes you should always call it if you are building any sort of binaries which may
depends on other binaries (ie. executables and shared libraries). please remember
that any library that uses libc must be compiled against but not have a dependency
on it since libc is essential package (exception is required if you need a particular
version of it).

> My postinst is:
> #!/bin/sh 
> # meschach.postinst, runs ldconfig 
> set -e 
>  
> case "$1" in 
>        configure) 
>                ldconfig 
>                ;; 
>        abort-upgrade|abort-remove|abort-deconfigure) 
>                ;; 
> esac 
>  
>  
> #DEBHELPER# 
> ##################################################
> 
this is correct

> Thanks for any clues or explanations,
> 
you are welcome :)

> Drew
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> PGP public key available at http://dparsons.webjump.com/drewskey.txt
> Fingerprint: A110 EAE1 D7D2 8076 5FE0  EC0A B6CE 7041 6412 4E4A
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 


-----[ Domenico Andreoli, aka cavok
 --[ http://filibusta.crema.unimi.it/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50



Reply to: