[gnome-ostree] deploy-qemu: Update to new deploy syntax, clean up
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree] deploy-qemu: Update to new deploy syntax, clean up
- Date: Mon, 27 Aug 2012 11:49:25 +0000 (UTC)
commit 8a943f503dcff1c2233d4bd3c0f54680c99e565b
Author: Colin Walters <walters verbum org>
Date: Mon Aug 27 07:48:52 2012 -0400
deploy-qemu: Update to new deploy syntax, clean up
.../pyostbuild/builtin_privhelper_deploy_qemu.py | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py b/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
index 297817b..4cc8922 100755
--- a/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
+++ b/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
@@ -55,14 +55,10 @@ class OstbuildPrivhelperDeployQemu(builtins.Builtin):
os.chmod(os.path.join(self.mountpoint, 'root'), 0700)
os.chmod(os.path.join(self.mountpoint, 'tmp'), 01777)
- varpath = os.path.join(self.mountpoint, 'ostree', 'var')
- fileutil.ensure_dir(varpath)
- modulespath = os.path.join(self.mountpoint, 'ostree', 'modules')
- fileutil.ensure_dir(modulespath)
-
- repo_path = os.path.join(self.mountpoint, 'ostree', 'repo')
- fileutil.ensure_dir(repo_path)
- subprocess.check_call(['ostree', '--repo=' + repo_path, 'init'])
+ ostree_dir = os.path.join(self.mountpoint, 'ostree')
+ if not os.path.isdir(os.path.join(ostree_dir, 'repo')):
+ run_sync(['ostadmin', 'init', '--ostree-dir=' + ostree_dir])
+
success = True
finally:
subprocess.call(['umount', self.mountpoint])
@@ -101,11 +97,8 @@ class OstbuildPrivhelperDeployQemu(builtins.Builtin):
child_args = ['ostree', '--repo=' + repo_path, 'pull-local', args.srcrepo, args.target]
run_sync(child_args)
- run_sync(['ostadmin', 'deploy', '--ostree-dir=' + ostree_dir, '--no-kernel', args.target, args.target],
+ run_sync(['ostadmin', 'deploy', '--ostree-dir=' + ostree_dir, '--no-kernel', args.target],
cwd=ostree_dir)
- current_link_path = os.path.join(ostree_dir, 'current')
- os.symlink(args.target, current_link_path + '.tmp')
- os.rename(current_link_path + '.tmp', current_link_path)
finally:
subprocess.call(['umount', self.mountpoint])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]