From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id F15E1138010 for ; Tue, 30 Oct 2012 20:02:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2609021C0CB; Tue, 30 Oct 2012 20:02:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EA1AA21C0CD for ; Tue, 30 Oct 2012 20:01:55 +0000 (UTC) Received: from [10.169.32.2] (212-226-75-61-nat.elisa-mobile.fi [212.226.75.61]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: ssuominen) by smtp.gentoo.org (Postfix) with ESMTPSA id 8701F33D8BF; Tue, 30 Oct 2012 20:01:54 +0000 (UTC) Message-ID: <50903117.5020502@gentoo.org> Date: Tue, 30 Oct 2012 21:57:11 +0200 From: Samuli Suominen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120916 Thunderbird/15.0.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: Alexis Ballier CC: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: udev.eclass References: <20121030190839.A9A3D21600@flycatcher.gentoo.org> <20121030165621.5441b0d6@gentoo.org> In-Reply-To: <20121030165621.5441b0d6@gentoo.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 409da935-d274-41da-b1bd-dd90dd70ae64 X-Archives-Hash: 5fecf9aed944c243f48310c1a2ff69df On 30/10/12 21:56, Alexis Ballier wrote: > On Tue, 30 Oct 2012 19:08:39 +0000 (UTC) > "Samuli Suominen (ssuominen)" 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? if the ebuild is EAPI=0 or EAPI=1 then DEPEND expands to RDEPEND, so setting empty RDEPEND prevents that, or am I missing something? > >> 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. > the code is more or less same as systemd.eclass has, I don't want to diverge too much from that since we are essentially dealing with the same package (tarball)