[Python-modules-team] Bug#748903: python-tornado: FTBFS on hurd-i386

Samuel Thibault sthibault at debian.org
Sun Oct 26 00:41:05 UTC 2014


I have NMUed the proposed patch to DELAYED/0, here is the debdiff.

Samuel
-------------- next part --------------
diff -Nru python-tornado-3.2.2/debian/changelog python-tornado-3.2.2/debian/changelog
--- python-tornado-3.2.2/debian/changelog	2014-06-20 17:35:54.000000000 +0200
+++ python-tornado-3.2.2/debian/changelog	2014-10-25 21:28:26.000000000 +0200
@@ -1,3 +1,12 @@
+python-tornado (3.2.2-1.1) unstable; urgency=medium
+
+  * Non-Maintainer Upload.
+  * patches/sockopt.patch: New patch to ignore ENOPROTOOPT errors from
+    SO_REUSEADDR or SO_ERROR on AF_UNIX sockets, for systems which do not
+    implement them there. Thanks Svante Signell for the patch. (Closes: #748903)
+
+ -- Samuel Thibault <sthibault at debian.org>  Sat, 25 Oct 2014 21:14:45 +0200
+
 python-tornado (3.2.2-1) unstable; urgency=medium
 
   * New upstream release
diff -Nru python-tornado-3.2.2/debian/patches/series python-tornado-3.2.2/debian/patches/series
--- python-tornado-3.2.2/debian/patches/series	2014-06-20 17:35:41.000000000 +0200
+++ python-tornado-3.2.2/debian/patches/series	2014-10-25 21:25:32.000000000 +0200
@@ -3,3 +3,4 @@
 ignoreuserwarning.patch
 domain-test.patch
 skip-timing-tests.patch
+sockopt.patch
diff -Nru python-tornado-3.2.2/debian/patches/sockopt.patch python-tornado-3.2.2/debian/patches/sockopt.patch
--- python-tornado-3.2.2/debian/patches/sockopt.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-tornado-3.2.2/debian/patches/sockopt.patch	2014-10-25 21:16:00.000000000 +0200
@@ -0,0 +1,38 @@
+Ignore ENOPROTOOPT errors from SO_REUSEADDR or SO_ERROR on AF_UNIX sockets, for
+systems which do not implement them there.
+
+Index: python-tornado-3.2.0/tornado/netutil.py
+===================================================================
+--- python-tornado-3.2.0.orig/tornado/netutil.py
++++ python-tornado-3.2.0/tornado/netutil.py
+@@ -119,7 +119,11 @@ if hasattr(socket, 'AF_UNIX'):
+         """
+         sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
+         set_close_exec(sock.fileno())
+-        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
++        try:
++            sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
++        except socket.error as e:
++            if e.args[0] != errno.ENOPROTOOPT:
++                raise
+         sock.setblocking(0)
+         try:
+             st = os.stat(file)
+Index: python-tornado-3.2.0/tornado/iostream.py
+===================================================================
+--- python-tornado-3.2.0.orig/tornado/iostream.py
++++ python-tornado-3.2.0/tornado/iostream.py
+@@ -748,7 +748,12 @@ class IOStream(BaseIOStream):
+         self._add_io_state(self.io_loop.WRITE)
+ 
+     def _handle_connect(self):
+-        err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
++        try:
++            err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
++        except socket.error as e:
++            err = e.args[0]
++            if err == errno.ENOPROTOOPT:
++                err = 0
+         if err != 0:
+             self.error = socket.error(err, os.strerror(err))
+             # IOLoop implementations may vary: some of them return


More information about the Python-modules-team mailing list