From f9700d0036550a79be827c4a60bff8bddbfd97aa Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Mon, 14 May 2007 03:38:43 +0000 Subject: create /var and /var/tmp in chroot if they don't exist git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1850 f8877401-5920-0410-a79b-8e2d7e04ca0d --- src/GLIUtility.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/GLIUtility.py b/src/GLIUtility.py index 1d2cf4f..0389e4b 100644 --- a/src/GLIUtility.py +++ b/src/GLIUtility.py @@ -299,6 +299,10 @@ def spawn(cmd, quiet=False, logfile=None, display_on_tty8=False, chroot=None, ap debug = False if chroot: + if not os.path.isdir(chroot + "/var"): + os.mkdir(chroot + "/var", mode=0755) + if not os.path.isdir(chroot + "/var/tmp"): + os.mkdir(chroot + "/var/tmp", mode=01777) wrapper = open(chroot+"/var/tmp/spawn.sh", "w") wrapper.write("#!/bin/bash -l\n" + cmd + "\nexit $?\n") wrapper.close() -- cgit v1.2.3-65-gdbad