public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] virtualx eclass possible issue
@ 2011-03-12 10:37 "Paweł Hajdan, Jr."
  2011-03-13  5:26 ` [gentoo-dev] " Ryan Hill
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: "Paweł Hajdan, Jr." @ 2011-03-12 10:37 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 741 bytes --]

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?


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-dev] Re: virtualx eclass possible issue
  2011-03-12 10:37 [gentoo-dev] virtualx eclass possible issue "Paweł Hajdan, Jr."
@ 2011-03-13  5:26 ` Ryan Hill
  2011-03-13  7:49 ` [gentoo-dev] " Michał Górny
  2011-03-13  8:25 ` Tomáš Chvátal
  2 siblings, 0 replies; 4+ messages in thread
From: Ryan Hill @ 2011-03-13  5:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Sat, 12 Mar 2011 11:37:28 +0100
"Paweł Hajdan, Jr." <phajdan.jr@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."

Sure looks like it to me.


-- 
fonts, gcc-porting,                  it makes no sense how it makes no sense
toolchain, wxwidgets                           but i'll take it free anytime
@ gentoo.org                EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] virtualx eclass possible issue
  2011-03-12 10:37 [gentoo-dev] virtualx eclass possible issue "Paweł Hajdan, Jr."
  2011-03-13  5:26 ` [gentoo-dev] " Ryan Hill
@ 2011-03-13  7:49 ` Michał Górny
  2011-03-13  8:25 ` Tomáš Chvátal
  2 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2011-03-13  7:49 UTC (permalink / raw
  To: gentoo-dev; +Cc: phajdan.jr

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]

On Sat, 12 Mar 2011 11:37:28 +0100
"Paweł Hajdan, Jr." <phajdan.jr@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] virtualx eclass possible issue
  2011-03-12 10:37 [gentoo-dev] virtualx eclass possible issue "Paweł Hajdan, Jr."
  2011-03-13  5:26 ` [gentoo-dev] " Ryan Hill
  2011-03-13  7:49 ` [gentoo-dev] " Michał Górny
@ 2011-03-13  8:25 ` Tomáš Chvátal
  2 siblings, 0 replies; 4+ messages in thread
From: Tomáš Chvátal @ 2011-03-13  8:25 UTC (permalink / raw
  To: gentoo-dev

-----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-----



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-03-13  8:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-12 10:37 [gentoo-dev] virtualx eclass possible issue "Paweł Hajdan, Jr."
2011-03-13  5:26 ` [gentoo-dev] " Ryan Hill
2011-03-13  7:49 ` [gentoo-dev] " Michał Górny
2011-03-13  8:25 ` Tomáš Chvátal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox