[PATCH 1/2] add command line option to set the arm platform.

Dennis Gilmore dennis at ausil.us
Fri Aug 3 22:56:03 UTC 2012


Use case is to create images using livemedia-creator where we wont be
running on the target platform.

Signed-off-by: Dennis Gilmore <dennis at ausil.us>
---
 anaconda            | 4 ++++
 pyanaconda/flags.py | 1 +
 pyanaconda/iutil.py | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/anaconda b/anaconda
index fc679c9..4bb2399 100755
--- a/anaconda
+++ b/anaconda
@@ -222,6 +222,7 @@ def parseOptions(argv=None, cmdline=None):
     op.add_option("--kickstart", dest="ksfile")
     op.add_option("--rescue", dest="rescue", action="store_true", default=False)
     op.add_option("--targetarch", "rpmarch", dest="targetArch", type="string")
+    op.add_option("--armplatform", "armplatform", dest="armPlatform", type="string")
 
     op.add_option("-m", "--method", dest="method", default=None)
     op.add_option("--repo", dest="method", default=None)
@@ -803,6 +804,9 @@ if __name__ == "__main__":
     if opts.targetArch:
         flags.targetarch = opts.targetArch
 
+    if opts.armPlatform:
+        flags.armPlatform = opts.armPlatform
+
     # set flags
     flags.dmraid = opts.dmraid
     flags.mpath = opts.mpath
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 92584fd..db5c5ef 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -58,6 +58,7 @@ class Flags(object):
         self.targetarch = None
         self.useIPv4 = True
         self.useIPv6 = True
+        self.armPlatform = None
         self.preexisting_x11 = False
         self.noverifyssl = False
         self.imageInstall = False
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index ed6d098..a57b643 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -627,6 +627,9 @@ def getARMMachine():
     if not isARM():
         return 0
 
+    if flags.armPlatform:
+        return flags.armPlatform
+
     armMachine = os.uname()[2].rpartition('.' )[2]
 
     if armMachine.startswith('arm'):
-- 
1.7.11.2



More information about the anaconda-patches mailing list