diff options
author | Richard Purdie <richard@openedhand.com> | 2008-03-25 15:13:23 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2008-03-25 15:13:23 +0000 |
commit | c6422207156a33edaf2d8dd72a37ef2d7ce7e966 (patch) | |
tree | a6cbffbd921ac438e9097d1c4e1393e4dae08423 | |
parent | a0d0bd249a37d39d4301963e86a9b0019b619599 (diff) | |
download | poky-c6422207156a33edaf2d8dd72a37ef2d7ce7e966.tar.gz |
xtrans: Add patch from upstream to fix abstract socket handling
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4113 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r-- | meta/packages/xorg-lib/xtrans-native_1.1.bb | 2 | ||||
-rw-r--r-- | meta/packages/xorg-lib/xtrans-sdk_1.1.bb | 2 | ||||
-rw-r--r-- | meta/packages/xorg-lib/xtrans/abstract_socket_fix.patch | 58 | ||||
-rw-r--r-- | meta/packages/xorg-lib/xtrans_1.1.bb | 6 |
4 files changed, 63 insertions, 5 deletions
diff --git a/meta/packages/xorg-lib/xtrans-native_1.1.bb b/meta/packages/xorg-lib/xtrans-native_1.1.bb index 793f1e4951..c7988c7264 100644 --- a/meta/packages/xorg-lib/xtrans-native_1.1.bb +++ b/meta/packages/xorg-lib/xtrans-native_1.1.bb | |||
@@ -2,6 +2,4 @@ require xtrans_${PV}.bb | |||
2 | 2 | ||
3 | DEPENDS = "util-macros-native" | 3 | DEPENDS = "util-macros-native" |
4 | 4 | ||
5 | SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2" | ||
6 | |||
7 | inherit native | 5 | inherit native |
diff --git a/meta/packages/xorg-lib/xtrans-sdk_1.1.bb b/meta/packages/xorg-lib/xtrans-sdk_1.1.bb index e018a64220..9f671180b2 100644 --- a/meta/packages/xorg-lib/xtrans-sdk_1.1.bb +++ b/meta/packages/xorg-lib/xtrans-sdk_1.1.bb | |||
@@ -2,6 +2,4 @@ require xtrans_${PV}.bb | |||
2 | 2 | ||
3 | DEPENDS = "util-macros-sdk" | 3 | DEPENDS = "util-macros-sdk" |
4 | 4 | ||
5 | SRC_URI = "${XORG_MIRROR}/individual/lib/${XORG_PN}-${PV}.tar.bz2" | ||
6 | |||
7 | inherit sdk | 5 | 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 index 0000000000..197da0735d --- /dev/null +++ b/meta/packages/xorg-lib/xtrans/abstract_socket_fix.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 556a351de83fc6f401b02213dae95731553c216d Mon Sep 17 00:00:00 2001 | ||
2 | From: Loïc Minier <lool@dooz.org> | ||
3 | Date: Mon, 24 Mar 2008 19:38:27 +0000 | ||
4 | Subject: Bug #10489: Don't retry unix socket connect()s on ENOENT. | ||
5 | |||
6 | If the socket isn't there, it's not gonna magically appear. Either it's | ||
7 | a server socket and you should have just waited for the SIGUSR1 from the | ||
8 | server, or it's a stale reference to an ICE socket. | ||
9 | |||
10 | However, do retry once, so fallback from abstract to filesystem namespace | ||
11 | works. | ||
12 | |||
13 | Originally Debian bug #385976. | ||
14 | --- | ||
15 | diff --git a/Xtranssock.c b/Xtranssock.c | ||
16 | index 8a7d2ec..da4afe9 100644 | ||
17 | --- a/Xtranssock.c | ||
18 | +++ b/Xtranssock.c | ||
19 | @@ -2146,8 +2146,13 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) | ||
20 | errno = olderrno; | ||
21 | |||
22 | /* | ||
23 | - * If the error was ENOENT, the server may be starting up | ||
24 | - * and we should try again. | ||
25 | + * If the error was ENOENT, the server may be starting up; we used | ||
26 | + * to suggest to try again in this case with | ||
27 | + * TRANS_TRY_CONNECT_AGAIN, but this introduced problems for | ||
28 | + * processes still referencing stale sockets in their environment. | ||
29 | + * Hence, we now return a hard error, TRANS_CONNECT_FAILED, and it | ||
30 | + * is suggested that higher level stacks handle retries on their | ||
31 | + * level when they face a slow starting server. | ||
32 | * | ||
33 | * If the error was EWOULDBLOCK or EINPROGRESS then the socket | ||
34 | * was non-blocking and we should poll using select | ||
35 | @@ -2161,14 +2166,14 @@ TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port) | ||
36 | else if (olderrno == EINTR) | ||
37 | return TRANS_TRY_CONNECT_AGAIN; | ||
38 | else if (olderrno == ENOENT) { | ||
39 | - /* | ||
40 | - * If opening as abstract socket failed, try again "normally" | ||
41 | - */ | ||
42 | - if (abstract) | ||
43 | + /* If opening as abstract socket failed, try again normally */ | ||
44 | + if (abstract) { | ||
45 | ciptr->transptr->flags &= ~(TRANS_ABSTRACT); | ||
46 | - return TRANS_TRY_CONNECT_AGAIN; | ||
47 | - } | ||
48 | - else { | ||
49 | + return TRANS_TRY_CONNECT_AGAIN; | ||
50 | + } else { | ||
51 | + return TRANS_CONNECT_FAILED; | ||
52 | + } | ||
53 | + } else { | ||
54 | PRMSG (2,"SocketUNIXConnect: Can't connect: errno = %d\n", | ||
55 | EGET(),0, 0); | ||
56 | |||
57 | -- | ||
58 | cgit v0.7.2-37-g538c | ||
diff --git a/meta/packages/xorg-lib/xtrans_1.1.bb b/meta/packages/xorg-lib/xtrans_1.1.bb index 31e1392fd2..92c0557140 100644 --- a/meta/packages/xorg-lib/xtrans_1.1.bb +++ b/meta/packages/xorg-lib/xtrans_1.1.bb | |||
@@ -1,9 +1,13 @@ | |||
1 | require xorg-lib-common.inc | 1 | require xorg-lib-common.inc |
2 | 2 | ||
3 | SRC_URI += "file://abstract_socket_fix.patch;patch=1" | ||
4 | |||
5 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xtrans" | ||
6 | |||
3 | DESCRIPTION = "network API translation layer to insulate X applications and \ | 7 | DESCRIPTION = "network API translation layer to insulate X applications and \ |
4 | libraries from OS network vageries." | 8 | libraries from OS network vageries." |
5 | PE = "1" | 9 | PE = "1" |
6 | PR = "r3" | 10 | PR = "r4" |
7 | 11 | ||
8 | RDEPENDS_${PN}-dev = "" | 12 | RDEPENDS_${PN}-dev = "" |
9 | 13 | ||