summaryrefslogtreecommitdiff
path: root/morphlib/stagingarea.py
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-20 13:05:39 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-04-20 13:05:39 +0100
commit49768355cffe2c566bf04082d86e651d059bd697 (patch)
treed9e71845939b95ae6c8dad8216210c5d3d39a35b /morphlib/stagingarea.py
parentd3d60b6cbf6d9fcf653b81efc3a3005dc106aad6 (diff)
downloadmorph-49768355cffe2c566bf04082d86e651d059bd697.tar.gz
Fix how we run commands in a chroot
We'll get back to linux-user-chroot later, but to do that, we need to sort out how we deal with the install-commands without needing real or fake root for them.
Diffstat (limited to 'morphlib/stagingarea.py')
-rw-r--r--morphlib/stagingarea.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/stagingarea.py b/morphlib/stagingarea.py
index b9d205df..1d8b6ef1 100644
--- a/morphlib/stagingarea.py
+++ b/morphlib/stagingarea.py
@@ -111,6 +111,7 @@ class StagingArea(object):
del kwargs['cwd']
else:
cwd = '/'
- real_argv = ['linux-user-chroot', '--chdir', cwd, self.dirname] + argv
+ real_argv = ['/usr/sbin/chroot', self.dirname, 'sh', '-xc',
+ 'cd "$1" && shift && exec "$@"', '--', cwd] + argv
return ex.runv(real_argv, **kwargs)