[Gllug] apt-get failing in chrooted python script...
Christof Meerwald
cmeerw at cmeerw.org
Thu Sep 9 12:35:21 UTC 2010
On Wed, 8 Sep 2010 12:58:03 +0100, Bruce Richardson wrote:
> On Wed, Sep 08, 2010 at 12:21:58AM +0100, general_email wrote:
>>=20
>> BTW, for reference, the path to the script is...=20
>> /home/r0g/AAA_BACKED_UP/Code/projects/Techbench/remaster/remasternate.py
> OK, that explains the error message. As I said in my other e-mails, the
> getcwd() function is returning a broken value. Now you have to find out
> why os.chroot isn't setting up the chroot entirely correctly (why the
> pre-chroot value for the cwd is leaking in).
see http://www.kernel.org/doc/man-pages/online/pages/man2/chroot.2.html
"This call does not change the current working directory, so that
after the call '.' can be outside the tree rooted at '/'."
So you'll probably want to do a os.chdir('/') after the chroot.
Christof
--
http://cmeerw.org sip:cmeerw at cmeerw.org
mailto:cmeerw at cmeerw.org xmpp:cmeerw at cmeerw.org
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list