chroot to install packages

Chris Angelico rosuav at gmail.com
Thu Nov 14 03:00:39 CET 2013


On Thu, Nov 14, 2013 at 12:52 PM, Himanshu Garg <hgarg.india at gmail.com> wrote:
> How can I do that?  Can you guide me?

First off: Google Groups is making your posts very ugly. Please either
fix them before posting, or use a better client.

https://wiki.python.org/moin/GoogleGroupsPython

As to chrooting: It'd look something like this, in pseudocode:

if sys.argv[1] == "chroot":
    chroot("/some/path/to/new/root")
    do_stuff_in_chroot()
    do_more_stuff_in_chroot()
    exit(0)

do_stuff_not_in_chroot()
os.system("python my_script_name.py chroot")
do_more_stuff_not_in_chroot()


There are many ways to do things, but that's one of the simplest. You
have two completely separate processes.

ChrisA



More information about the Python-list mailing list