diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rwxr-xr-x | anaconda | 6 | ||||
-rw-r--r-- | flags.py | 4 | ||||
-rw-r--r-- | iutil.py | 4 |
4 files changed, 18 insertions, 3 deletions
@@ -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) @@ -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 @@ -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 @@ -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 |