Re: [gentoo-dev] virtualx eclass possible issue

2011-03-13 Thread Tomáš Chvátal
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Dne 12.3.2011 11:37, Paweł Hajdan, Jr. napsal(a):
 One of my ebuilds is using virtualx eclass, and I noticed the following
 code inside the eclass:
 
 retval=$?
 
 # Now kill Xvfb
 kill $(cat /tmp/.X${XDISPLAY}-lock)
 else
 debug-print ${FUNCNAME}: attaching to running X display
 # Normal make if we can connect to an X display
 debug-print ${FUNCNAME}: ${VIRTUALX_COMMAND} \$@\
 ${VIRTUALX_COMMAND} $@
 retval=$?
 fi
 
 # die if our command failed
 [[ $? -ne 0 ]]  die ${FUNCNAME}: the ${VIRTALX_COMMAND} failed.
 
 Shouldn't that last line look more like this (notice $retval instead of $?):
 
 [[ $retval -ne 0 ]]  die ${FUNCNAME}: the ${VIRTALX_COMMAND} failed.
 
 What do you think?
 
Ack to both what you said and what Michal said. Fixed in cvs :)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk18f18ACgkQHB6c3gNBRYfoMACfYiOyC7nJlp/AI0gUE37KBVEL
dboAnRkahB1np882D/b7R80vGU9uzXky
=DFzF
-END PGP SIGNATURE-



[gentoo-dev] virtualx eclass possible issue

2011-03-12 Thread Paweł Hajdan, Jr.
One of my ebuilds is using virtualx eclass, and I noticed the following
code inside the eclass:

retval=$?

# Now kill Xvfb
kill $(cat /tmp/.X${XDISPLAY}-lock)
else
debug-print ${FUNCNAME}: attaching to running X display
# Normal make if we can connect to an X display
debug-print ${FUNCNAME}: ${VIRTUALX_COMMAND} \$@\
${VIRTUALX_COMMAND} $@
retval=$?
fi

# die if our command failed
[[ $? -ne 0 ]]  die ${FUNCNAME}: the ${VIRTALX_COMMAND} failed.

Shouldn't that last line look more like this (notice $retval instead of $?):

[[ $retval -ne 0 ]]  die ${FUNCNAME}: the ${VIRTALX_COMMAND} failed.

What do you think?



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] virtualx eclass possible issue

2011-03-12 Thread Michał Górny
On Sat, 12 Mar 2011 11:37:28 +0100
Paweł Hajdan, Jr. phajdan...@gentoo.org wrote:

 Shouldn't that last line look more like this (notice $retval instead
 of $?):
 
 [[ $retval -ne 0 ]]  die ${FUNCNAME}: the ${VIRTALX_COMMAND}
 failed.
 
 What do you think?

I'd say even '${VIRTUALX_COMMAND}'.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature