]> code.ossystems Code Review - openembedded-core.git/commitdiff
xtrans: Add patch from upstream to fix abstract socket handling
authorRichard Purdie <richard@openedhand.com>
Tue, 25 Mar 2008 15:13:23 +0000 (15:13 +0000)
committerRichard Purdie <richard@openedhand.com>
Tue, 25 Mar 2008 15:13:23 +0000 (15:13 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4113 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/xorg-lib/xtrans-native_1.1.bb
meta/packages/xorg-lib/xtrans-sdk_1.1.bb
meta/packages/xorg-lib/xtrans/abstract_socket_fix.patch [new file with mode: 0644]
meta/packages/xorg-lib/xtrans_1.1.bb

index 793f1e4951ed184173d9b5a3af54cab114f142cf..c7988c7264d8ba01c1933b1437969aa2f39f0c5e 100644 (file)
@@ -2,6 +2,4 @@ require xtrans_${PV}.bb
 
 DEPENDS = "util-macros-native"
 
-SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2"
-
 inherit native
index e018a6422005f8dc66ba30b9b1fb7efc42507057..9f671180b2aeb9577f485c9aef0b220e40e1b590 100644 (file)
@@ -2,6 +2,4 @@ require xtrans_${PV}.bb
 
 DEPENDS = "util-macros-sdk"
 
-SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2"
-
 inherit sdk
diff --git a/meta/packages/xorg-lib/xtrans/abstract_socket_fix.patch b/meta/packages/xorg-lib/xtrans/abstract_socket_fix.patch
new file mode 100644 (file)
index 0000000..197da07
--- /dev/null
@@ -0,0 +1,58 @@
+From 556a351de83fc6f401b02213dae95731553c216d Mon Sep 17 00:00:00 2001
+From: Loïc Minier <lool@dooz.org>
+Date: Mon, 24  Mar  2008  19:38:27  +0000
+Subject: Bug #10489: Don't retry unix socket connect()s on ENOENT.
+
+If the socket isn't there, it's not gonna magically appear.  Either it's
+a server socket and you should have just waited for the SIGUSR1 from the
+server, or it's a stale reference to an ICE socket.
+
+However, do retry once, so fallback from abstract to filesystem namespace
+works.
+
+Originally Debian bug #385976.
+---
+diff --git a/Xtranssock.c b/Xtranssock.c
+index 8a7d2ec..da4afe9 100644
+--- a/Xtranssock.c
++++ b/Xtranssock.c
+@@ -2146,8 +2146,13 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
+           errno = olderrno;
+           
+           /*
+-           * If the error was ENOENT, the server may be starting up
+-           * and we should try again.
++           * If the error was ENOENT, the server may be starting up; we used
++           * to suggest to try again in this case with
++           * TRANS_TRY_CONNECT_AGAIN, but this introduced problems for
++           * processes still referencing stale sockets in their environment.
++           * Hence, we now return a hard error, TRANS_CONNECT_FAILED, and it
++           * is suggested that higher level stacks handle retries on their
++           * level when they face a slow starting server.
+            *
+            * If the error was EWOULDBLOCK or EINPROGRESS then the socket
+            * was non-blocking and we should poll using select
+@@ -2161,14 +2166,14 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
+           else if (olderrno == EINTR)
+               return TRANS_TRY_CONNECT_AGAIN;
+           else if (olderrno == ENOENT) {
+-              /*
+-              * If opening as abstract socket failed, try again "normally"
+-              */
+-              if (abstract)
++              /* If opening as abstract socket failed, try again normally */
++              if (abstract) {
+                   ciptr->transptr->flags &= ~(TRANS_ABSTRACT);
+-              return TRANS_TRY_CONNECT_AGAIN;
+-          }
+-          else {
++                  return TRANS_TRY_CONNECT_AGAIN;
++              } else {
++                  return TRANS_CONNECT_FAILED;
++              }
++          } else {
+               PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n",
+                      EGET(),0, 0);
+--
+cgit v0.7.2-37-g538c
index 31e1392fd2a21fa0e9863b94fa8db4c432bd8e4a..92c0557140b950f6f7774955a85d37dba8aee90e 100644 (file)
@@ -1,9 +1,13 @@
 require xorg-lib-common.inc
 
+SRC_URI += "file://abstract_socket_fix.patch;patch=1"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xtrans"
+
 DESCRIPTION = "network API translation layer to insulate X applications and \
 libraries from OS network vageries."
 PE = "1"
-PR = "r3"
+PR = "r4"
 
 RDEPENDS_${PN}-dev = ""