Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: Matt Turner <mattst88@g.o>, qa <qa@g.o>
Subject: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Tue, 30 Jul 2019 05:20:27
Message-Id: 7d6bc1215f71e82028717943c606ab836c2a5c20.camel@gentoo.org
1 On Tue, 2019-07-30 at 01:49 +0000, Matt Turner wrote:
2 > commit: 6f680e4fe73925ae130343e02adb416cb799ce7d
3 > Author: Chris Mayo <aklhfex <AT> gmail <DOT> com>
4 > AuthorDate: Fri Jul 26 18:48:13 2019 +0000
5 > Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
6 > CommitDate: Tue Jul 30 01:49:41 2019 +0000
7 > URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f680e4f
8 >
9 > virtualx.eclass: Fix no display for an emerge following a failure
10 >
11 > If using GNOME GDM, X is started on DISPLAY :0 but a lock file
12 > /tmp/.X1024-lock is created instead of /tmp/.X0-lock.
13 > virtx() will initially set XDISPLAY to 0 and attempt to start Xvfb on
14 > DISPLAY :0 which fails but DISPLAY :1 (and greater) is not attempted if
15 > a previous emerge left /tmp/.X1-lock behind.
16 >
17 > Closes: https://bugs.gentoo.org/690778
18 > Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
19 > Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
20 >
21 > eclass/virtualx.eclass | 7 +++++--
22 > 1 file changed, 5 insertions(+), 2 deletions(-)
23 >
24 > diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
25 > index fb6a867a35c..40eeea5463b 100644
26 > --- a/eclass/virtualx.eclass
27 > +++ b/eclass/virtualx.eclass
28 > @@ -1,4 +1,4 @@
29 > -# Copyright 1999-2018 Gentoo Foundation
30 > +# Copyright 1999-2019 Gentoo Authors
31 > # Distributed under the terms of the GNU General Public License v2
32 >
33 > # @ECLASS: virtualx.eclass
34 > @@ -178,7 +178,10 @@ virtx() {
35 > # Xvfb is started, else bump the display number
36 > #
37 > # Azarah - 5 May 2002
38 > - XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
39 > + # GNOME GDM may have started X on DISPLAY :0 with a
40 > + # lock file /tmp/.X1024-lock, therefore start the search at 1.
41 > + # Else a leftover /tmp/.X1-lock will prevent finding an available display.
42 > + XDISPLAY=$(i=1; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
43 > debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}"
44 >
45 > # We really do not want SANDBOX enabled here
46
47 Isn't this a cheap hack that doesn't fix the underlying issue but shifts
48 the problem into hopefully-won't-happen-this-time?
49
50 Also, why are you skipping mailing list review for eclass changes?
51
52 --
53 Best regards,
54 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies