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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5CE66158094 for ; Tue, 2 Aug 2022 04:04:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D485FE0E88; Tue, 2 Aug 2022 04:04:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9E920E0E88 for ; Tue, 2 Aug 2022 04:04:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B762340FD0 for ; Tue, 2 Aug 2022 04:04:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9058E55B for ; Tue, 2 Aug 2022 04:04:12 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1659413019.aa75351b53dbd55153b224bc97ea1fec141dc7c6.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/virtualx.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: aa75351b53dbd55153b224bc97ea1fec141dc7c6 X-VCS-Branch: master Date: Tue, 2 Aug 2022 04:04:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cb8b80b3-b100-4167-a567-742664cbafea X-Archives-Hash: e344f6b69ede6b59a2e3fc2b8b241495 commit: aa75351b53dbd55153b224bc97ea1fec141dc7c6 Author: Michał Górny gentoo org> AuthorDate: Fri Jul 8 06:26:50 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Aug 2 04:03:39 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa75351b virtualx.eclass: Pass xvfbargs as an array Signed-off-by: Michał Górny gentoo.org> eclass/virtualx.eclass | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass index 5c4b39164cff..d7b82e12cdd5 100644 --- a/eclass/virtualx.eclass +++ b/eclass/virtualx.eclass @@ -109,7 +109,7 @@ virtx() { local retval=0 local OLD_SANDBOX_ON="${SANDBOX_ON}" local XVFB XHOST XDISPLAY - local xvfbargs="-screen 0 1280x1024x24 +extension RANDR" + local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR ) XVFB=$(type -p Xvfb) || die XHOST=$(type -p xhost) || die @@ -134,24 +134,24 @@ virtx() { # We really do not want SANDBOX enabled here export SANDBOX_ON="0" - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & + debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & sleep 2 local start=${XDISPLAY} while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do # Stop trying after 15 tries if ((XDISPLAY - start > 15)) ; then - eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:" + eerror "'${XVFB} :${XDISPLAY} ${xvfbargs[*]}' returns:" echo - ${XVFB} :${XDISPLAY} ${xvfbargs} + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" echo eerror "If possible, correct the above error and try your emerge again." die "Unable to start Xvfb" fi ((XDISPLAY++)) - debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" - ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & + debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" + ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & sleep 2 done