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

Base package/shared library issues (was: Bug#2436 ...)



Sorry for the duplicates some of you may have received.

> Yes, go ahead and use it straight away.  Make sure you say
>   dpkg --assert-support-predepends
> in the preinst script, in case the package gets fed to an older
> version of dpkg (which would just ignore the Pre-Depends control file
> field).

OK.  Should this be done for all base packages or only for those
marked as essential?

> Can you change it straight away, please ?  The window of brokenness
> even with dpkg's old symlink handling is very small (smaller than that
> between command invocations in a script), and that way you won't need
> to change again.

OK, shared library maintainers, listen up.  You need to make two
changes to your packages.

First, your package should install the shared libraries under their
normal names.  For example, the libgdbm1 package should install
libgdbm.so.1.7.3 as /usr/lib/libgdbm.so.1.7.3.  There is no longer any
need to install things under different names and then rename them in
the postinst script.  Dpkg will take care of renaming things safely
without affecting running programs.  Also, the files should not be
renamed or relinked by any prerm or postrm scripts either.  This is
needed so dpkg can clean up properly when the package is removed or
upgraded.

Second, your package should include the symlink that ldconfig would
create for the shared libraries.  For example, the libgdbm1 package
should include a symlink from /usr/lib/libgdbm.so.1 to
libgdbm.so.1.7.3.  This is needed so that ld.so can find the library
in between the time dpkg installs it and ldconfig is run in the
postinst script.  Futhermore, and THIS IS VERY IMPORTANT, the symlink
must be placed before the library it points to in the .deb file.  The
way to currently ensure the ordering is done properly is to create the
symlink in the appropriate debian-tmp/.../lib directory before
installing the library when you build the package.

David
-- 
David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081


Reply to: