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

Bug#604082: apt-utils: apt-ftparchive doesn't work within a fakechroot (realpath invalid argument)



reassign 604082 fakechroot
thanks

On Sat, Nov 20, 2010 at 01:47, Michael Gilbert
<michael.s.gilbert@gmail.com> wrote:
> apt-ftparchive seems to fail when run within a fakechroot.  This leads to failures
> when building d-i within a fakechroot.  The following should reproduce the issue:
>
>  $ export PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
>  $ fakeroot fakechroot debootstrap --variant=fakechroot sid ./fake-chroot http://ftp.us.debian.org/debian
>  [...]
>  $ fakeroot fakechroot chroot ./fake-chroot/ apt-get source hello
>  [...]
>  $ fakeroot fakechroot chroot ./fake-chroot/ apt-ftparchive sources /
>  E: Failed to resolve / - realpath (22: Invalid argument)

This error message tells you that the call realpath("/", NULL); failed with
EINVAL with the fakechroot implementation of realpath while the "normal"
implementation happily returns the expected result
("/" in this case as there is nothing relative).

For people willing to look the call in question up in the source:
apt_source/ftparchive/writer.cc - FTWScanner::RecursiveScan() ~ line 160
(but some more at other places, too)

>From what i read in the realpath manpage, it seems that APT depends on
a POSIX.1-2008 standardized implementation of realpath as it sets the
second argument to NULL and expects the magic to happen, while after
a quick glance at the source the fakechroot implementation seems to expects
that instead of MULL a an already allocated char-pointer is given.

I am therefore reassign that bug to fakechroot
so the maintainer can have a look.


> Thanks for looking into this.

Thanks for taking the time to report this. :)


Best regards

David Kalnischkies



Reply to: