]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
Remove the urlgrabber fork hack.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Feb 2013 18:24:17 +0000 (19:24 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 28 Feb 2013 18:24:17 +0000 (19:24 +0100)
python/pakfire/daemon.py
python/pakfire/downloader.py
python/pakfire/transport.py

index 353a46882a3dc71c05bb750c541acb715107c2dd..59800cfd6d62e7792f2363bc85f0b6f69951a3f1 100644 (file)
@@ -237,7 +237,6 @@ class PakfireDaemonKeepalive(multiprocessing.Process):
 
                # Create connection to the hub.
                self.transport = transport.PakfireHubTransport(self.config)
-               self.transport.fork()
 
                # Send our profile to the hub.
                self.send_builder_info()
@@ -358,7 +357,6 @@ class PakfireWorker(multiprocessing.Process):
 
                # Create connection to the hub.
                self.transport = transport.PakfireHubTransport(self.config)
-               self.transport.fork()
 
                while self.__running:
                        # Try to get a new build job.
index 41aa529ace7b09d8d73ad981991c6db8b82ea6ab..0b5b5b6a47f59cd8c87301c37d01a3a71330b8cc 100644 (file)
@@ -74,17 +74,6 @@ class PakfireGrabber(URLGrabber):
 
                URLGrabber.__init__(self, *args, **kwargs)
 
-       def fork(self):
-               """
-                       Reset Curl object after forking a process.
-               """
-               # XXX this is a very ugly hack and fiddles around with the internals
-               # or urlgrabber. We should not touch these, but apparently nobody
-               # else uses multiple threads or processes to talk to their servers.
-               # So we simply replace Curl with a new instance without closing
-               # the old one. This should be fixed in urlgrabber and/or pycurl.
-               urlgrabber.grabber._curl_cache = pycurl.Curl()
-
        def check_offline_mode(self):
                offline = self.config.get("downloader", "offline")
                if not offline:
index ec836e03e03a607d7625dbfcebb36b5ff6f5f7ce..ca799a3a2519b1f4ea81568d54c82bdb3aa4297d 100644 (file)
@@ -193,9 +193,6 @@ class PakfireHubTransport(object):
                        self.config, prefix=self.url,
                )
 
-       def fork(self):
-               return self.grabber.fork()
-
        @property
        def url(self):
                """