From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5CF2A138334 for ; Tue, 30 Jul 2019 05:29:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9038AE0835; Tue, 30 Jul 2019 05:29:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2FDB3E0829 for ; Tue, 30 Jul 2019 05:29:21 +0000 (UTC) Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mattst88) by smtp.gentoo.org (Postfix) with ESMTPSA id CE4B2348FB0 for ; Tue, 30 Jul 2019 05:29:19 +0000 (UTC) Received: by mail-io1-f42.google.com with SMTP id z3so6523718iog.0 for ; Mon, 29 Jul 2019 22:29:19 -0700 (PDT) X-Gm-Message-State: APjAAAUreBLpzLsgCR+QE/RSR3xU3AAcpCj8CFcf8vSyKrbBsrkdeTXQ 93mITE4yzzaEDC2ubEroVBCqjVadMqcDIxu7kVI= X-Google-Smtp-Source: APXvYqwX7cinCuXZxPMJoV8BS/AmrnDOUJAxzWjJ/u0OYNnF1wuHJfGtSEhJZgVZJoMz+eywoewbVqR5voUtqXkWFMs= X-Received: by 2002:a02:29ce:: with SMTP id p197mr55866540jap.139.1564464557700; Mon, 29 Jul 2019 22:29:17 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <1564451381.6f680e4fe73925ae130343e02adb416cb799ce7d.mattst88@gentoo> <7d6bc1215f71e82028717943c606ab836c2a5c20.camel@gentoo.org> In-Reply-To: <7d6bc1215f71e82028717943c606ab836c2a5c20.camel@gentoo.org> From: Matt Turner Date: Mon, 29 Jul 2019 22:29:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: [gentoo-dev] Re: [gentoo-commits] repo/gentoo:master commit in: eclass/ To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= Cc: gentoo development , qa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: a452984c-de65-473e-8a8f-dc6e76581234 X-Archives-Hash: e32184d5f61c3b8ce5c5f8e26526add0 On Mon, Jul 29, 2019 at 10:20 PM Micha=C5=82 G=C3=B3rny = wrote: > > On Tue, 2019-07-30 at 01:49 +0000, Matt Turner wrote: > > commit: 6f680e4fe73925ae130343e02adb416cb799ce7d > > Author: Chris Mayo gmail com> > > AuthorDate: Fri Jul 26 18:48:13 2019 +0000 > > Commit: Matt Turner gentoo org> > > CommitDate: Tue Jul 30 01:49:41 2019 +0000 > > URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3D6f68= 0e4f > > > > 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 gmail.com> > > Signed-off-by: Matt Turner 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=3D$(i=3D0; 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=3D$(i=3D1; while [[ -f /tmp/.X${i}-lock ]] ; do ((i++));= done; echo ${i}) > > debug-print "${FUNCNAME}: XDISPLAY=3D${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.