[RFC/PATCH] do not run ldconfig with DESTDIR installs
Mike Frysinger
vapier@gentoo.org
Sun Aug 12 14:46:00 GMT 2012
On Sunday 12 August 2012 09:20:29 Carlos O'Donell wrote:
> On Sun, Aug 12, 2012 at 2:15 AM, Mike Frysinger wrote:
> > On Tuesday 07 August 2012 18:47:50 Mike Frysinger wrote:
> >> There is no point in trying to scan the non-DESTDIR tree when we are
> >> doing a DESTDIR install. It just wastes time and attempts to write
> >> to a path we most likely cannot update in the first place.
> >
> > looks like i misread the behavior here. ldconfig does only access/write
> > to things inside of the -r ROOT. what threw me off was that if you run
> > this as non-root, ldconfig uses full paths everywhere (ROOT/etc/...).
> > but if you run it as root, it first does chroot(ROOT), then uses
> > absolute paths after that (/etc...). so if you miss that initial
> > chroot(), it looks like ldconfig is crapping all over places it
> > shouldn't. so i guess i'll drop this patch from consideration.
>
> Given your confusion do you think we need better documentation?
>
> I would accept any trivial patch to add more comments to any set of
> files that would have helped make this clearer to a future maintainer.
the issue is that warnings issued after the chroot() lack the full path:
$ ldconfig -r /tmp/ /foo
ldconfig: Warning: ignoring configuration file that cannot be opened:
/etc/ld.so.conf: No such file or directory
ldconfig: Can't create temporary cache file /tmp/etc/ld.so.cache~: No such file
or directory
$ sudo ldconfig -r /tmp/ /foo
ldconfig: Warning: ignoring configuration file that cannot be opened:
/etc/ld.so.conf: No such file or directory
ldconfig: Can't create temporary cache file /etc/ld.so.cache~: No such file or
directory
this is what led me down the route of looking at its behavior via strace. so
it might be possible to improve this.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120812/175f91ba/attachment.sig>
More information about the Libc-alpha
mailing list