1 |
commit: aa75351b53dbd55153b224bc97ea1fec141dc7c6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 8 06:26:50 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 2 04:03:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa75351b |
7 |
|
8 |
virtualx.eclass: Pass xvfbargs as an array |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
eclass/virtualx.eclass | 14 +++++++------- |
13 |
1 file changed, 7 insertions(+), 7 deletions(-) |
14 |
|
15 |
diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass |
16 |
index 5c4b39164cff..d7b82e12cdd5 100644 |
17 |
--- a/eclass/virtualx.eclass |
18 |
+++ b/eclass/virtualx.eclass |
19 |
@@ -109,7 +109,7 @@ virtx() { |
20 |
local retval=0 |
21 |
local OLD_SANDBOX_ON="${SANDBOX_ON}" |
22 |
local XVFB XHOST XDISPLAY |
23 |
- local xvfbargs="-screen 0 1280x1024x24 +extension RANDR" |
24 |
+ local xvfbargs=( -screen 0 1280x1024x24 +extension RANDR ) |
25 |
XVFB=$(type -p Xvfb) || die |
26 |
XHOST=$(type -p xhost) || die |
27 |
|
28 |
@@ -134,24 +134,24 @@ virtx() { |
29 |
# We really do not want SANDBOX enabled here |
30 |
export SANDBOX_ON="0" |
31 |
|
32 |
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" |
33 |
- ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & |
34 |
+ debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" |
35 |
+ ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & |
36 |
sleep 2 |
37 |
|
38 |
local start=${XDISPLAY} |
39 |
while [[ ! -f /tmp/.X${XDISPLAY}-lock ]]; do |
40 |
# Stop trying after 15 tries |
41 |
if ((XDISPLAY - start > 15)) ; then |
42 |
- eerror "'${XVFB} :${XDISPLAY} ${xvfbargs}' returns:" |
43 |
+ eerror "'${XVFB} :${XDISPLAY} ${xvfbargs[*]}' returns:" |
44 |
echo |
45 |
- ${XVFB} :${XDISPLAY} ${xvfbargs} |
46 |
+ ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" |
47 |
echo |
48 |
eerror "If possible, correct the above error and try your emerge again." |
49 |
die "Unable to start Xvfb" |
50 |
fi |
51 |
((XDISPLAY++)) |
52 |
- debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs}" |
53 |
- ${XVFB} :${XDISPLAY} ${xvfbargs} &>/dev/null & |
54 |
+ debug-print "${FUNCNAME}: ${XVFB} :${XDISPLAY} ${xvfbargs[*]}" |
55 |
+ ${XVFB} :${XDISPLAY} "${xvfbargs[@]}" &>/dev/null & |
56 |
sleep 2 |
57 |
done |