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

Bug#770658: fails to debootstrap debian on fedora: Failure trying to run: chroot /debian mount -t proc proc /proc

On Sun, 2014-11-23 at 15:24 +0100, Cyril Brulebois wrote:
> Joey Hess <id@joeyh.name> (2014-11-22):
> > Suggested fix: Before chrooting into the debootstrapped chroot to run
> > commands, debootstrap should ensure that the PATH includes all
> > directories it does on a standard debian system. Eg:
> > 
> > PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> > 
> > This way, the host system's chroot etc will still be found whereever
> > it's PATH has them, and the debian system's commands will likewise be
> > found.
> I see two naive approaches here: append said $PATH unconditionally, or
> walk through each component and only append those who aren't in $PATH
> already. Not sure how reliable it would be to split current $PATH
> using ':' as a separator, in case there are some funnily-named,
> maybe-quoted directories in there. I'm happy to receive hints here.

':' is always a separator; $PATH cannot include directories whose names
contain colons.

But does it make sense to use the outer system's $PATH at all?  Why
shouldn't debootstrap reset it to the Debian default whenever it runs a
command in chroot?


Ben Hutchings
Never put off till tomorrow what you can avoid all together.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: