Andrew Suffield wrote:
> Read the fakeroot manpage for an explanation of why fakeroot does not
> wrap open().
The real way around
this is to wrap open() and create(), but that creates other
problems, as demonstrated by the libtricks package. This package
wrapped many more functions, and tried to do a lot more than
fakeroot . It turned out that a minor upgrade of libc (from one
where the stat() function didn't use open() to one with a stat()
function that did (in some cases) use open()), would cause unex-
plainable segfaults (that is, the libc6 stat() called the
wrapped open(), which would then call the libc6 stat(), etc).
Fixing them wasn't all that easy, but once fixed, it was just a
matter of time before another function started to use open(),
never mind trying to port it to a different operating system.
Thus I decided to keep the number of functions wrapped by fake-
root as small as possible, to limit the likelihood of 'colli-
sions'.
It's certianly possible to work around this kind of thing, if not always
pretty. I've sucesfully kept open() wrapping working in libmooproxy for over
a year. Anyway, it probably wasn't worth it if fakeroot was only wrapping
open to get the information used to resolve the touch problem described
earlier in the man page, but it might be worth the pain to add open path
support. Up to Clint of course..
Of course, it would sort of suck if we became dependent on this, and then
glibc broke it in some way that was impossible to work around without
hacking glibc. That would put us in a messy position. At least if fakeroot
breaks irreparably now, we have an easy work around.
--
see shy jo
Attachment:
pgpIvnGQE0wRB.pgp
Description: PGP signature