On Tue, 30 Oct 2012 19:08:39 +0000 (UTC)
"Samuli Suominen (ssuominen)" <[email protected]> wrote:

[...]
> 
> case ${EAPI:-0} in
>       0|1|2|3|4) ;;
>       *) die "${ECLASS}.eclass API in EAPI ${EAPI} not yet
> established." esac

sounds like a useless and annoying check for just exporting one function

> 
> RDEPEND=""

useless?

> DEPEND="virtual/pkgconfig"
> 
> # @FUNCTION: _udev_get_udevdir
> # @INTERNAL
> # @DESCRIPTION:
> # Get unprefixed udevdir.
> _udev_get_udevdir() {
>       if $($(tc-getPKG_CONFIG) --exists udev); then
>               echo -n "$($(tc-getPKG_CONFIG) --variable=udevdir
> udev)" else
>               echo -n /lib/udev
>       fi
> }
> 
> # @FUNCTION: udev_get_udevdir
> # @DESCRIPTION:
> # Output the path for the udev directory (not including ${D}).
> # This function always succeeds, even if udev is not installed.
> # The fallback value is set to /lib/udev
> udev_get_udevdir() {
>       has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
>       debug-print-function ${FUNCNAME} "${@}"
> 
>       echo -n "${EPREFIX}$(_udev_get_udevdir)"
> }

local foo=""
unfold _udev_get_udevdir there, replacing 'echo -n' by foo=
printf ...$foo

kill the extra internal fucntion that seems useless.
echo isn't really reliable for precise formatting, prefer printf when
it matters. (in this case it doesn't matter but seems good practices)

have you checked what is the udevdir value on prefix, if at all
relevant ? I fear a double prefix issue.

Reply via email to