[oe] [oe-commits] Koen Kooi : initscripts: only run ldconfig on boot when ld.so. conf is present

Stanislav Brabec utx at penguin.cz
Sun Nov 2 10:52:54 UTC 2008


Carsten Haitzler wrote:
> On Sat, 01 Nov 2008 12:38:16 +0100 Stanislav Brabec <utx at penguin.cz> babbled:
> 
> > Koen Kooi wrote:
> > 
> > > I don't have a strong opinion on that :) People more knowledgable about 
> > > ldconfig should chip in on this topic.
> > 
> > And what about something like:
> > if ..../ld.so.cache -ot /usr/lib -o /etc/ld.so.cache -ot /lib ; then
> >     /sbin/ldconfig
> > fi
> 
> you'd need to include all dirs in ld.so.conf in addition...

Yes.

> also doesn't cover
> me overwriting existing .so's in the lib dir with new ones. :)

Overwriting of existing .so is an extremely risky operation and I guess
that install command nor any packaging system do it. To safely
replace .so file, you have to unlink existing instance and use a
different inode for the new instance. This operation updates directory
mtime.

> run ldconfig.

I agree with the rest. Ldconfig should be called whenever any package is
installed.

> at some point when oe was building images, it was unable to run ldconfig using
> qemu natively within the rootfs before converting to a file system image (ext2,
> jffs2, or tar etc.) and thus as a workaround to not being able to do this, it
> was run on boot to populate ld.so.cache. it's possible to do this now via qemu
> before packaging up the rootfs.

It's not generally true. Some platforms have no support in qemu, some
platforms are broken in qemu and commands fail there. The command
proposed above may be a work-around for this case.

I can imagine one-time script for this purpose. Platform has no working
qemu support => packaging scripts will place one-time commands
somewhere.

Being inspired by DejaGnu, I can also imagine a native host as an
alternative solution for platforms without qemu support.

- Build (minimal) environment not needing any native run and being able
  to run on target.
- Mount a target root as a chroot on native host via a NFS.
- Using a ssh and chroot command, execute required code and get result
  back.

(Well, it would complicate life to Koen a bit.)

It could perform any task not possible on build system:
- run ldconfig
- generate locales (may need swap on native host)
- compile emacs macros
...


________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus





More information about the Openembedded-devel mailing list