summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rwxr-xr-xanaconda6
-rw-r--r--flags.py4
-rw-r--r--iutil.py4
4 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index adfafc4ce..ba35c8542 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-20 Jeremy Katz <katzj@redhat.com>
+
+ * anaconda (Anaconda.setMethod): Allow passing --targetarch
+ (#206881)
+ * flags.py (Flags.__init__): Set targetarch as a flag
+ * iutil.py (writeRpmPlatform): Use flag
+
2006-09-20 David Cantrell <dcantrell@redhat.com>
* loader2/net.c (manualNetConfig): Translation fix (#207069)
diff --git a/anaconda b/anaconda
index d56e27952..c5764676a 100755
--- a/anaconda
+++ b/anaconda
@@ -199,7 +199,8 @@ def parseOptions():
op.add_option("-r", "--rootpath", action="callback", callback=rootpath_cb, dest="rootPath",
default="/mnt/sysimage", nargs=1, type="string")
op.add_option("-t", "--test", action="store_true", default=False)
-
+ op.add_option("--targetarch", dest="targetArch", nargs=1, type="string")
+
# Display
op.add_option("--headless", dest="isHeadless", action="store_true", default=False)
op.add_option("--lowres", dest="resolution", action="store_const", const="640x480")
@@ -663,6 +664,9 @@ if __name__ == "__main__":
if opts.iscsi:
flags.iscsi = 1
+ if opts.targetarch:
+ flags.targetarch = opts.targetarch
+
# set dmraid and mpath flags
flags.dmraid = opts.dmraid
flags.mpath = opts.mpath
diff --git a/flags.py b/flags.py
index d0310fcc7..764c58325 100644
--- a/flags.py
+++ b/flags.py
@@ -62,6 +62,7 @@ class Flags:
self.__dict__['flags']['dmraid'] = 1
self.__dict__['flags']['selinux'] = SELINUX_DEFAULT
self.__dict__['flags']['debug'] = 0
+ self.__dict__['flags']['targetarch'] = None
self.__dict__['flags']['cmdline'] = self.createCmdlineDict()
# for non-physical consoles like some ppc and sgi altix,
# we need to preserve the console device and not try to
@@ -78,6 +79,9 @@ class Flags:
if self.__dict__['flags']['cmdline'].has_key("debug"):
self.__dict__['flags']['debug'] = self.__dict__['flags']['cmdline']['debug']
+ if self.__dict__['flags']['cmdline'].has_key("rpmarch"):
+ self.__dict__['flags']['targetarch'] = self.__dict__['flags']['cmdline']['rpmarch']
+
if not os.path.exists("/selinux/load"):
self.__dict__['flags']['selinux'] = 0
diff --git a/iutil.py b/iutil.py
index a53f9a874..73d5012cc 100644
--- a/iutil.py
+++ b/iutil.py
@@ -399,8 +399,8 @@ def writeRpmPlatform(root="/"):
myarch = rhpl.arch.canonArch
# now allow an override with rpmarch=i586 on the command line (#101971)
- if flags.cmdline.has_key("rpmarch"):
- myarch = flags.cmdline["rpmarch"]
+ if flags["targetarch"] != None:
+ myarch = flags["targetarch"]
# now make the current install believe it, too
rhpl.arch.canonArch = myarch