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 75053138010 for ; Tue, 30 Oct 2012 20:10:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 00F8521C029; Tue, 30 Oct 2012 20:09:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D50BC21C06C for ; Tue, 30 Oct 2012 20:08:16 +0000 (UTC) Received: from localhost (unknown [200.89.69.133]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id 3725033D907; Tue, 30 Oct 2012 20:08:14 +0000 (UTC) Date: Tue, 30 Oct 2012 17:08:07 -0300 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Cc: ssuominen@gentoo.org Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: udev.eclass Message-ID: <20121030170807.12fdb04b@gentoo.org> In-Reply-To: <50903117.5020502@gentoo.org> References: <20121030190839.A9A3D21600@flycatcher.gentoo.org> <20121030165621.5441b0d6@gentoo.org> <50903117.5020502@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-pc-linux-gnu) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: a0e2e8e9-0b25-4026-9d75-73aef6559e92 X-Archives-Hash: d492221ced686abe61869352445fc33a On Tue, 30 Oct 2012 21:57:11 +0200 Samuli Suominen wrote: > 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? even with eclasses and inheritence ? maybe you're right but i wouldnt bet anything > > > > >> 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) well, two bad do not make a good consider the above remarks to apply to systemd.eclass too then, and either explain why they're not relevant or apply them to both eclasses if you want to avoid divergence.