From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RGaq8-00068h-Fq for garchives@archives.gentoo.org; Wed, 19 Oct 2011 18:26:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 352D221C08B; Wed, 19 Oct 2011 18:25:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 095FE21C032 for ; Wed, 19 Oct 2011 18:25:25 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 776CC1B401A for ; Wed, 19 Oct 2011 18:25:25 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] huse: new helper for low level eclass writers Date: Wed, 19 Oct 2011 14:25:25 -0400 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) References: <201110191405.51308.vapier@gentoo.org> In-Reply-To: <201110191405.51308.vapier@gentoo.org> 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; boundary="nextPart2646842.gBcSBFSE5B"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201110191425.25675.vapier@gentoo.org> X-Archives-Salt: X-Archives-Hash: 7af5fb7bde342e8538837ce994237f8c --nextPart2646842.gBcSBFSE5B Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wednesday 19 October 2011 14:05:50 Mike Frysinger wrote: > now that we have "in_iuse" in eutils.eclass (with all the caveats), i'll = be > adding huse: > huse() { > in_iuse $1 || return 1 > use $1 > } actually, after posting this, "iuse" is probably a better name. "huse" cam= e=20 up because the code constructs i was using before was like: has foo ${IUSE} && use foo && ..... which collapses into: h[as foo ${IUSE} && ]use foo && ... huse foo && ... so new proposal for those who love 1 liners: iuse() { in_iuse $1 && use $1 || return 1 ; } =2Dmike --nextPart2646842.gBcSBFSE5B Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJOnxYVAAoJEEFjO5/oN/WBQUkP/3/nrNYIqWVDxQctGqx8O63V BhPPW23XHfPkONNIpKlx+inxlQ7zgc6lDG+J1T58gWrphHmSbnql+nivg8Y/AJdV WPmPB2Hl+GeIwQmphwAL+wLDCzPfZlNFTYOHfktXmNQZvjYzQ/GezVyO2lIrXuiX 9FLkKNAowvUY7vfMQUURjCiipwgt0aUzo4GzTb64u16y9NwAi3HTryNlhwIA//iA ZFQ5SKF2ZqDHYNPgUhl17zYVGwDPU5nuWkEa0viAj8UhiwMQJUHEqFNr5Rl2kyMB FpfUcsiSn3apzK3Qr/fq6zXwjFfLmjZB8KQbZ6iQrH2yIcW/UzN1UvqAGQEXz+kT JsS2G1XVSMpUmX7sypYG9zEm6Lq1fL8ey61RQIGNa7m13g7Tg5VODE+xKcS4hxZz 4D+MmPlTnUFVQcCtPoFpPLJLcmwmSv+IvVSQU/WMq2QnK9Z8q0L9H5YS/uyWDCJN ZgGKLpI5bS4IuNR0tJuX4p5tcKwIbVrOGUI7of+Hn5dbY7UvoEMZIrq6mvbxjCJ+ 1rwy3I9Zs8E6/HQXVv9ekUuwggsG4R8pkCo+rD8qlajqYNqeBkHc1cR2qiCFs06/ 6HgOfX8kupAKon1AO3gEpN0TXC6Xip7eghgzhHHB5taI8IEBbPDtoiX0rF50wi2K LOiMXwYevjZmm5We3S2V =KC8o -----END PGP SIGNATURE----- --nextPart2646842.gBcSBFSE5B--