[PATCH 1/3] Fix threading initialization
Martin Sivak
msivak at redhat.com
Tue Oct 16 14:36:50 UTC 2012
Glib threads have to be initialized before we start using them. And we start with them in the setupDisplay method, hence the change..
---
anaconda | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/anaconda b/anaconda
index 39fa065..5a3611b 100755
--- a/anaconda
+++ b/anaconda
@@ -887,6 +887,10 @@ if __name__ == "__main__":
else:
log.error("Unknown method: %s", (anaconda.methodstr,))
+ # init threading before Gtk can do anything
+ from pyanaconda.threads import initThreading, threadMgr, AnacondaThread
+ initThreading()
+
# now start the interface
setupDisplay(anaconda, opts)
@@ -935,13 +939,11 @@ if __name__ == "__main__":
from pyanaconda.storage import storageInitialize
from pyanaconda.packaging import payloadInitialize
from pyanaconda.network import networkInitialize
- from pyanaconda.threads import initThreading, threadMgr, AnacondaThread
if anaconda.rescue:
from pyanaconda.rescue import doRescue
doRescue(anaconda.rescue_mount, ksdata, anaconda.platform)
- initThreading()
threadMgr.add(AnacondaThread(name="AnaStorageThread", target=storageInitialize, args=(anaconda.storage, ksdata, anaconda.protected)))
threadMgr.add(AnacondaThread(name="AnaPayloadThread", target=payloadInitialize, args=(anaconda.storage, ksdata, anaconda.payload)))
# TODO start dhcp in thread if we have no connection
--
1.7.11.4
More information about the anaconda-patches
mailing list