[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-dev
Subject: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/
From: Matt Turner <mattst88 () gentoo ! org>
Date: 2019-07-30 5:29:05
Message-ID: CAEdQ38EtP_XrrfNfMdAJqZH=uRvnUa0L=ZWpOv9KUHgc0i-WvQ () mail ! gmail ! com
[Download RAW message or body]
On Mon, Jul 29, 2019 at 10:20 PM Michał Górny <mgorny@gentoo.org> wrote:
>
> On Tue, 2019-07-30 at 01:49 +0000, Matt Turner wrote:
> > commit: 6f680e4fe73925ae130343e02adb416cb799ce7d
> > Author: Chris Mayo <aklhfex <AT> gmail <DOT> com>
> > AuthorDate: Fri Jul 26 18:48:13 2019 +0000
> > Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
> > CommitDate: Tue Jul 30 01:49:41 2019 +0000
> > URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f680e4f
> >
> > virtualx.eclass: Fix no display for an emerge following a failure
> >
> > If using GNOME GDM, X is started on DISPLAY :0 but a lock file
> > /tmp/.X1024-lock is created instead of /tmp/.X0-lock.
> > virtx() will initially set XDISPLAY to 0 and attempt to start Xvfb on
> > DISPLAY :0 which fails but DISPLAY :1 (and greater) is not attempted if
> > a previous emerge left /tmp/.X1-lock behind.
> >
> > Closes: https://bugs.gentoo.org/690778
> > Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
> > Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
> >
> > eclass/virtualx.eclass | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
> > index fb6a867a35c..40eeea5463b 100644
> > --- a/eclass/virtualx.eclass
> > +++ b/eclass/virtualx.eclass
> > @@ -1,4 +1,4 @@
> > -# Copyright 1999-2018 Gentoo Foundation
> > +# Copyright 1999-2019 Gentoo Authors
> > # Distributed under the terms of the GNU General Public License v2
> >
> > # @ECLASS: virtualx.eclass
> > @@ -178,7 +178,10 @@ virtx() {
> > # Xvfb is started, else bump the display number
> > #
> > # Azarah - 5 May 2002
> > - XDISPLAY=$(i=0; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
> > + # GNOME GDM may have started X on DISPLAY :0 with a
> > + # lock file /tmp/.X1024-lock, therefore start the search at 1.
> > + # Else a leftover /tmp/.X1-lock will prevent finding an available display.
> > + XDISPLAY=$(i=1; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));done; echo ${i})
> > debug-print "${FUNCNAME}: XDISPLAY=${XDISPLAY}"
> >
> > # We really do not want SANDBOX enabled here
>
> Isn't this a cheap hack that doesn't fix the underlying issue but shifts
> the problem into hopefully-won't-happen-this-time?
Yes, but given that the prior code was a cheap hack as well (from
2002, no less!) and has worked out well enough for 17 years that no
one has reported problems with it until now, I don't think it's
critical to make it bullet-proof.
Of course I'm happy to accept patches.
> Also, why are you skipping mailing list review for eclass changes?
Ah, you are right. My apologies.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic