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 2F8C8138010 for ; Tue, 30 Oct 2012 20:19:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0864B21C06C; Tue, 30 Oct 2012 20:18:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 790F921C0EB for ; Tue, 30 Oct 2012 20:17:12 +0000 (UTC) Received: from pomiocik.lan (213-238-96-169.adsl.inetia.pl [213.238.96.169]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 9EDC033D92A; Tue, 30 Oct 2012 20:17:10 +0000 (UTC) Date: Tue, 30 Oct 2012 21:18:02 +0100 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: aballier@gentoo.org, ssuominen@gentoo.org Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in eclass: udev.eclass Message-ID: <20121030211802.749e4ef3@pomiocik.lan> In-Reply-To: <20121030170807.12fdb04b@gentoo.org> References: <20121030190839.A9A3D21600@flycatcher.gentoo.org> <20121030165621.5441b0d6@gentoo.org> <50903117.5020502@gentoo.org> <20121030170807.12fdb04b@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: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/CkfQ6qukHoaTIB53iNG2Keh"; protocol="application/pgp-signature" X-Archives-Salt: 6f721676-7ddf-4708-beeb-c224eccbc213 X-Archives-Hash: 7639f0777a3b2417330db6cf70458275 --Sig_/CkfQ6qukHoaTIB53iNG2Keh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 30 Oct 2012 17:08:07 -0300 Alexis Ballier wrote: > On Tue, 30 Oct 2012 21:57:11 +0200 > Samuli Suominen wrote: >=20 > > 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=3D"" > > > > > > useless? > >=20 > > if the ebuild is EAPI=3D0 or EAPI=3D1 then DEPEND expands to RDEPEND, s= o=20 > > setting empty RDEPEND prevents that, or am I missing something? >=20 > even with eclasses and inheritence ? maybe you're right but i wouldnt > bet anything >=20 > >=20 > > > > > >> DEPEND=3D"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=3Dudevdir > > >> 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=3D > > >> debug-print-function ${FUNCNAME} "${@}" > > >> > > >> echo -n "${EPREFIX}$(_udev_get_udevdir)" > > >> } > > > > > > local foo=3D"" > > > unfold _udev_get_udevdir there, replacing 'echo -n' by foo=3D > > > 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. > > > > >=20 > > the code is more or less same as systemd.eclass has, I don't want to=20 > > diverge too much from that since we are essentially dealing with the=20 > > same package (tarball) >=20 > 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. Don't even try to touch any of my eclasses without prior asking. And the additional internal function there was used in order to get unprefixed path for do*() and new*() functions. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/CkfQ6qukHoaTIB53iNG2Keh Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iJwEAQEIAAYFAlCQNfsACgkQfXuS5UK5QB3FdwP8DUm4VlK4UxcuicaFOUcs3OSA qAehU20Pb89vTAJaoLg1gxDOp6oezJeQ20aL6JKsQCLn0g52m7k10XZYGLa2C/gc dAm1af0Fn9FJs2NYT4RcGAlLU0ARIVZIRi3NVJK2WIe7u8x0u2Z+6aPIKStmr8n/ SRLEYOta4TdMMVgp0Jk= =QIDn -----END PGP SIGNATURE----- --Sig_/CkfQ6qukHoaTIB53iNG2Keh--