[Pkg-openldap-devel] Re: r556 - openldap/trunk-2.1/debian

Steve Langasek vorlon@debian.org
Thu, 19 May 2005 00:36:12 -0700


--OX7PPUk8qMPP4++R
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Torsten,

Sorry, it looks like this mail ended up in the wrong mailbox somehow, and
I've uploaded 2.1.30-8 before seeing this.

On Wed, May 18, 2005 at 09:10:29AM +0200, Torsten Landschoff wrote:
> On Wed, May 18, 2005 at 04:57:06AM +0000, Steve Langasek wrote:
> > Log:
> > nuke files orphaned by libldap2-tls on install, so that running ldconfig
> > doesn't break our symlinks.

> > Added: openldap/trunk-2.1/debian/libldap2.postinst
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > --- openldap/trunk-2.1/debian/libldap2.postinst	2005-05-14 03:00:06 UTC=
 (rev 555)
> > +++ openldap/trunk-2.1/debian/libldap2.postinst	2005-05-18 04:57:06 UTC=
 (rev 556)
> > @@ -0,0 +1,8 @@
> > +#!/bin/sh -e
> > +
> > +if [ "$1" =3D "configure" ]; then
> > +	rm -f /usr/lib/libldap.so.2.0.15 /usr/lib/libldap_r.so.2.0.15 \
> > +	      /usr/lib/liblber.so.2.0.15
> > +fi
> > +
> > +#DEBHELPER#

> Thanks for figuring this out, Steve! The problem I am seeing is that
> there were different versions of libldap2-tls and we can't be sure what
> the user is running. I don't have libldap2-tls available anymore but I
> found libldap2-tls on the net as 2.0.27-3.bunk which has the following
> code in the postrm:

> undivert_lib() {
>         dpkg-divert --package libldap2-tls --remove --rename \
>                 --divert /usr/lib/lib$1-notls.so.2.0.17 \
>                         /usr/lib/lib$1.so.2.0.17
> }

> if [ "$1" =3D remove ]; then
>         for i in ldap_r ldap lber; do
>                 undivert_lib $i
>         done
> fi

> Looking at this now I wonder if postrm is always called with "remove".
> Looking at the policy I get the impression that it might also be called
> with the "upgrade" parameter instead. So maybe we have different library
> versions.=20

Yes, there are a number of different options with which the postrm could
have been called; I'm not sure which one actually matches the case we're
seeing here.

Note that, if it were merely a case of failing to un-divert, dpkg should
still have a record of the diversion, which would show up in the output of
'dpkg -S'; it doesn't.

> So maybe we have do deal with other versions of libldap2* as well. The
> other question: Doesn't dpkg remove the diversions of a package together
> with the package?=20

It's the responsibility of the package to manage diversions from its
maintainer scripts; I don't believe they would be automatically removed by
dpkg at any point.  Even so, see above.

Your suggestion that there could be multiple old broken versions of
libldap.so.2 does concern me, but so far everyone reporting this problem has
specifically had libldap.so.2.0.15.

--=20
Steve Langasek
postmodern programmer

--OX7PPUk8qMPP4++R
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCjEHrKN6ufymYLloRAhZaAJ4/KQFOlwCwMvLRgZW62buMaiOt1gCfXPRf
2GBbCzDsXwkc8lXvg6WQZjg=
=RhZQ
-----END PGP SIGNATURE-----

--OX7PPUk8qMPP4++R--