[ostree] ostbuild: Add rootdir argument to deploy-qemu



commit 210fbc3daf827ae11b24570cdb94da8c4366e9c3
Author: Colin Walters <walters verbum org>
Date:   Wed Jun 6 15:43:42 2012 -0400

    ostbuild: Add rootdir argument to deploy-qemu

 .../pyostbuild/builtin_privhelper_deploy_qemu.py   |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py b/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
index a14eb1c..9380c46 100755
--- a/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
+++ b/src/ostbuild/pyostbuild/builtin_privhelper_deploy_qemu.py
@@ -71,6 +71,8 @@ class OstbuildPrivhelperDeployQemu(builtins.Builtin):
 
     def execute(self, argv):
         parser = argparse.ArgumentParser(description=self.short_description)
+        parser.add_argument('--rootdir',
+                            help="Directory containing OSTree data (default: /ostree)")
         parser.add_argument('srcrepo')
         parser.add_argument('targets', nargs='+')
 
@@ -79,7 +81,10 @@ class OstbuildPrivhelperDeployQemu(builtins.Builtin):
         if os.geteuid() != 0:
             fatal("This helper can only be run as root")
 
-        self.ostree_dir = self.find_ostree_dir()
+        if args.rootdir:
+            self.ostree_dir = args.rootdir
+        else:
+            self.ostree_dir = self.find_ostree_dir()
         self.qemu_path = os.path.join(self.ostree_dir, "ostree-qemu.img")
 
         self.mountpoint = os.path.join(self.ostree_dir, 'ostree-qemu-mnt')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]