Gentoo Archives: gentoo-dev

From: "Tomáš Chvátal" <scarabeus@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] virtualx eclass possible issue
Date: Sun, 13 Mar 2011 08:26:52
Message-Id: 4D7C7F5F.70904@gentoo.org
In Reply to: [gentoo-dev] virtualx eclass possible issue by "Paweł Hajdan
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Dne 12.3.2011 11:37, "Paweł Hajdan, Jr." napsal(a):
5 > One of my ebuilds is using virtualx eclass, and I noticed the following
6 > code inside the eclass:
7 >
8 > retval=$?
9 >
10 > # Now kill Xvfb
11 > kill $(cat /tmp/.X${XDISPLAY}-lock)
12 > else
13 > debug-print "${FUNCNAME}: attaching to running X display"
14 > # Normal make if we can connect to an X display
15 > debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\""
16 > ${VIRTUALX_COMMAND} "$@"
17 > retval=$?
18 > fi
19 >
20 > # die if our command failed
21 > [[ $? -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed."
22 >
23 > Shouldn't that last line look more like this (notice $retval instead of $?):
24 >
25 > [[ $retval -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed."
26 >
27 > What do you think?
28 >
29 Ack to both what you said and what Michal said. Fixed in cvs :)
30 -----BEGIN PGP SIGNATURE-----
31 Version: GnuPG v2.0.17 (GNU/Linux)
32 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
33
34 iEYEARECAAYFAk18f18ACgkQHB6c3gNBRYfoMACfYiOyC7nJlp/AI0gUE37KBVEL
35 dboAnRkahB1np882D/b7R80vGU9uzXky
36 =DFzF
37 -----END PGP SIGNATURE-----