[Gllug] apt-get failing in chrooted python script...

Bruce Richardson itsbruce at workshy.org
Sun Sep 12 08:18:18 UTC 2010


On Sun, Sep 12, 2010 at 05:20:08AM +0100, general_email at technicalbloke.com wrote:
> 
> Yep, you're both right...
> 
> os.chroot(squashfs)
> print os.getcwd()
>  >>> /home/r0g/AAA_BACKED_UP/Code/projects/Techbench/remaster/workspace
> os.chdir("/")
> print os.getcwd()
>  >>> /

Labouring the point a little, the reason I wanted you to test what was
happening with the current directory rather than just jump to testing
what would happen if you set the directory is because you should always
want to have unambiguously identified the issue before fixing it.  If
you just apply fixes till one works, you can never be sure if you
addressed an issue directly or if some side effect of your actions
resolved the problem (in which case the fix may not work again in
another situation) or even if you simply masked the problem (in which
case it'll probably resurface at the most inconvenient point).

-- 
Bruce

Bitterly it mathinketh me, that I spent mine wholle lyf in the lists
against the ignorant.  -- Roger Bacon, "Doctor Mirabilis"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20100912/99214006/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list