On 30-10-2012 16:56:21 -0300, Alexis Ballier wrote:
> > # @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)

echo -n is not always working, but in this case no point in using it at
all.

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

I definitely share your concern.  (_udev_get_udevdir has a broken
implementation, given its contract per documentation)


-- 
Fabian Groffen
Gentoo on a different level

Attachment: signature.asc
Description: Digital signature

Reply via email to