diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2011-12-08 08:33:37 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2011-12-08 09:56:29 +0000 |
commit | 007f2e556796f749ab24d79106cd0f1da46b00c3 (patch) | |
tree | e80221342522d9f5b0d7ab361143004461d06965 /morph | |
parent | 38d6f5c1b3cb4890d105fdda07f87e0f78522e21 (diff) | |
download | morph-007f2e556796f749ab24d79106cd0f1da46b00c3.tar.gz |
Make the install parts of morphs run as sudo
Then fix all the places where this broke things because they didn't have
the required permissions.
This is a potential security risk of course, it would be preferable if
the install commands were run in a fakeroot session and only the final
image building was run as root, but it needs to work first
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -68,7 +68,9 @@ class Morph(cliapp.Application): self.msg('Building %s - %s - %s' % (repo, ref, filename)) builder.build(repo, ref, filename) - tempdir.remove() + # we may not have permission to tempdir.remove() + ex = morphlib.execute.Execute('.', lambda msg: None) + ex.runv(["rm", "-rf", tempdir.dirname], as_root=True) if args: raise cliapp.AppException('Extra args on command line: %s' % args) |