FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 02-22-2010, 04:11 PM
Ales Kozumplik
 
Default fix: do not initialize the install interface whenever is is accessed (#565872)

This problem has been present after 39a52ed1ddb2c. VNC+kickstart with %pre
script installs were crashing due to attempt to use X server to early.
---
anaconda | 65 +++++++++++++++++++++++++++++++++----------------------------
1 files changed, 35 insertions(+), 30 deletions(-)

diff --git a/anaconda b/anaconda
index 7bac8ce..116c54f 100755
--- a/anaconda
+++ b/anaconda
@@ -514,36 +514,6 @@ class Anaconda(object):
return self._instLanguage

def _getInterface(self):
- if self._intf:
- return self._intf
-
- # setup links required by graphical mode if installing and verify display mode
- if self.displayMode == 'g':
- stdoutLog.info (_("Starting graphical installation."))
-
- try:
- from gui import InstallInterface
- except Exception, e:
- stdoutLog.error("Exception starting GUI installer: %s" %(e,))
- # if we're not going to really go into GUI mode, we need to get
- # back to vc1 where the text install is going to pop up.
- if not flags.livecdInstall:
- isys.vtActivate (1)
- stdoutLog.warning("GUI installer startup failed, falling back to text mode.")
- self.displayMode = 't'
- if 'DISPLAY' in os.environ.keys():
- del os.environ['DISPLAY']
- time.sleep(2)
-
- if self.displayMode == 't':
- from text import InstallInterface
- if not os.environ.has_key("LANG"):
- os.environ["LANG"] = "en_US.UTF-8"
-
- if self.displayMode == 'c':
- from cmdline import InstallInterface
-
- self._intf = InstallInterface()
return self._intf

def _setInterface(self, v):
@@ -610,6 +580,39 @@ class Anaconda(object):

exn.write(self, fo)

+ def initInterface(self):
+ if self._intf:
+ raise RuntimeError, "Second attempt to initialize the InstallInterface"
+
+ # setup links required by graphical mode if installing and verify display mode
+ if self.displayMode == 'g':
+ stdoutLog.info (_("Starting graphical installation."))
+
+ try:
+ from gui import InstallInterface
+ except Exception, e:
+ stdoutLog.error("Exception starting GUI installer: %s" %(e,))
+ # if we're not going to really go into GUI mode, we need to get
+ # back to vc1 where the text install is going to pop up.
+ if not flags.livecdInstall:
+ isys.vtActivate (1)
+ stdoutLog.warning("GUI installer startup failed, falling back to text mode.")
+ self.displayMode = 't'
+ if 'DISPLAY' in os.environ.keys():
+ del os.environ['DISPLAY']
+ time.sleep(2)
+
+ if self.displayMode == 't':
+ from text import InstallInterface
+ if not os.environ.has_key("LANG"):
+ os.environ["LANG"] = "en_US.UTF-8"
+
+ if self.displayMode == 'c':
+ from cmdline import InstallInterface
+
+ self._intf = InstallInterface()
+ return self._intf
+
def writeXdriver(self):
# this should go away at some point, but until it does, we
# need to keep it around.
@@ -1104,6 +1107,8 @@ if __name__ == "__main__":
runVNC()
doStartupX11Actions(opts.runres)

+ # with X running we can initialize the UI interface
+ anaconda.initInterface()
anaconda.instClass.configure(anaconda)

# comment out the next line to make exceptions non-fatal
--
1.6.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org