Bug#3170: again dpkg --root=xxx
Package: dpkg
Version: 1.2.3
Lukas Nellen writes ("again dpkg --root=xxx"):
...
> From a quick look at the code for dpkg the problem seems to be the
> following: You chroot to the root directory, but you call execv with
> the original path name. Then, in the chroot'ed environment, the execv
> call fails since the path has the extraneous prefix to the new root.
> I guess that chopping the leading root path between the calls
> preexecscript(scriptpath,arglist);
> execv(scriptpath,arglist);
> in main/help.c should fix the problem. If you want me to, I can look a
> bit more carefully at your code to come up with a patch.
Thanks for the report, you would appear to be right.
I don't have time to deal with this right now, so I've filed it as a
bug report. I'll probably fix it before the next dpkg, though.
Sending a patch would probably not be very helpful - I'd probably want
to write it my own way anyway. Thanks for the thought, though.
Ian.
Reply to: