The system configuration should be correct for whatever architecture we're installing; anaconda is the wrong place to set this policy. Signed-off-by: Bill Nottingham <notting@xxxxxxxxxx> --- anaconda | 4 ---- pyanaconda/backend.py | 1 - pyanaconda/iutil.py | 46 ---------------------------------------------- pyanaconda/livecd.py | 3 --- pyanaconda/yuminstall.py | 4 ---- 5 files changed, 0 insertions(+), 58 deletions(-) diff --git a/anaconda b/anaconda index d3c65a2..6c37f12 100755 --- a/anaconda +++ b/anaconda @@ -534,10 +534,6 @@ if __name__ == "__main__": # add our own additional signal handlers signal.signal(signal.SIGHUP, startDebugger) - # we need to do this really early so we make sure its done before rpm - # is imported - iutil.writeRpmPlatform() - graphical_failed = 0 vncS = vnc.VncServer() # The vnc Server object. vncS.anaconda = anaconda diff --git a/pyanaconda/backend.py b/pyanaconda/backend.py index e874987..6d8ea1c 100644 --- a/pyanaconda/backend.py +++ b/pyanaconda/backend.py @@ -202,7 +202,6 @@ def doBackendSetup(anaconda): if anaconda.upgrade: anaconda.backend.checkSupportedUpgrade(anaconda) - iutil.writeRpmPlatform(anaconda.rootPath) def doPostSelection(anaconda): return anaconda.backend.doPostSelection(anaconda) diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py index 1c5bb5b..72f314b 100644 --- a/pyanaconda/iutil.py +++ b/pyanaconda/iutil.py @@ -701,52 +701,6 @@ def isEfi(): return efi -## Generate the /etc/rpm/macros file. -# @param root The root of the filesystem to create the files in. -def writeRpmPlatform(root="/"): - import rpmUtils.arch - - if os.access("%s/etc/rpm/platform" %(root,), os.R_OK): - return - if not os.access("%s/etc/rpm" %(root,), os.X_OK): - os.mkdir("%s/etc/rpm" %(root,)) - - myarch = rpmUtils.arch.canonArch - - # now allow an override with rpmarch=i586 on the command line (#101971) - if flags.targetarch != None: - myarch = flags.targetarch - - # now make the current install believe it, too - rpmUtils.arch.canonArch = myarch - - # FIXME: writing /etc/rpm/macros feels wrong somehow - # temporary workaround for #92285 - if not (myarch.startswith("ppc64") or - myarch in ("s390x", "sparc64", "x86_64", "ia64")): - return - if os.access("%s/etc/rpm/macros" %(root,), os.R_OK): - if myarch.startswith("ppc64") or myarch == "sparc64": - f = open("%s/etc/rpm/macros" %(root,), 'r+') - lines = f.readlines() - addPrefer = True - for line in lines: - if line.startswith("%_prefer_color"): - addPrefer = False - if addPrefer: - f.write("%_prefer_color 1\n") - f.close() - return - else: - return - - f = open("%s/etc/rpm/macros" %(root,), 'w+') - f.write("%_transaction_color 3\n") - if myarch.startswith("ppc64") or myarch == "sparc64": - f.write("%_prefer_color 1\n") - - f.close() - # Architecture checking functions def isX86(bits=None): diff --git a/pyanaconda/livecd.py b/pyanaconda/livecd.py index 9df91b4..0f6dc3e 100644 --- a/pyanaconda/livecd.py +++ b/pyanaconda/livecd.py @@ -394,9 +394,6 @@ class LiveCDCopyBackend(backend.AnacondaBackend): self._doFilesystemMangling(anaconda) - # setup /etc/rpm/ for the post-install environment - iutil.writeRpmPlatform(anaconda.rootPath) - storage.writeEscrowPackets(anaconda) packages.rpmSetupGraphicalSystem(anaconda) diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index f811ac6..743c23d 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -1202,7 +1202,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon # FIXME: make sure that the rpmdb doesn't have stale locks :/ iutil.resetRpmDb(anaconda.rootPath) - iutil.writeRpmPlatform() self.ayum = AnacondaYum(anaconda) self.ayum.setup() @@ -1575,9 +1574,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon self.initLog(anaconda.rootPath) - # setup /etc/rpm/ for the post-install environment - iutil.writeRpmPlatform(anaconda.rootPath) - try: # FIXME: making the /var/lib/rpm symlink here is a hack to # workaround db->close() errors from rpm -- 1.7.3.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list