Gentoo Archives: gentoo-dev

From: "Paweł Hajdan
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] virtualx eclass possible issue
Date: Sat, 12 Mar 2011 10:38:23
Message-Id: 4D7B4CE8.6030808@gentoo.org
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?

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Re: virtualx eclass possible issue Ryan Hill <dirtyepic@g.o>
Re: [gentoo-dev] virtualx eclass possible issue "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] virtualx eclass possible issue "Tomáš Chvátal" <scarabeus@g.o>