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 <gentoo-dev+bounces-34775-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1LgBSg-0003f9-MK
	for garchives@archives.gentoo.org; Sun, 08 Mar 2009 05:22:07 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 05439E04BC;
	Sun,  8 Mar 2009 05:22:05 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id D769CE04BC
	for <gentoo-dev@lists.gentoo.org>; Sun,  8 Mar 2009 05:22:04 +0000 (UTC)
Received: from gentoo.org (c-98-246-79-112.hsd1.or.comcast.net [98.246.79.112])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTP id 50AC164975
	for <gentoo-dev@lists.gentoo.org>; Sun,  8 Mar 2009 05:22:04 +0000 (UTC)
Date: Sat, 7 Mar 2009 21:22:03 -0800
From: Donnie Berkholz <dberkholz@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] x-modular.eclass: A modified approach to EAPI
	support
Message-ID: <20090308052203.GA14240@comet>
References: <20090306205729.GC22566@comet>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0"
Content-Disposition: inline
In-Reply-To: <20090306205729.GC22566@comet>
User-Agent: Mutt/1.5.18 (2008-05-17)
X-Archives-Salt: f2bb4f0d-aaa2-44b1-bf10-1793addc593c
X-Archives-Hash: 8977faa74e424e04000bc60bbc9136eb


--k+w/mQv8wyuph6w0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 12:57 Fri 06 Mar     , Donnie Berkholz wrote:
> I decided to try something a little different because I had some ideas=20
> for improving the existing EAPI patches I've seen going into other=20
> eclasses. So here is my patch for x-modular.eclass. I tested it with=20
> ebuilds using EAPIs 0, 1, and 2, and it appeared to work fine. It=20
> already happened to have a function called src_configure, so that=20
> doesn't appear in the patch.

FYI, using EXPORT_FUNCTIONS before inherit, as this patch caused=20
x-modular.eclass to do, is broken in current portage releases. Zac said=20
he would change this to be consistent with the lack of any ordering=20
restriction in the PMS. Thanks to Tom=C3=A1=C5=A1 Chv=C3=A1tal for tracking=
 down this=20
tricky bug!

I ran a quick check across everything in the tree and was happy to see=20
nothing doing this besides my eclass patch. Here's the scriptlet I used:

for i in /usr/portage/eclass/*; do
  grep -q EXPORT_FUNCTIONS $i || continue
  grep -q inherit $i || continue
  LINE1=3D$(grep -n EXPORT_FUNCTIONS $i | grep -v ':#' | cut -d: -f1 | head=
 -n1)
  LINE2=3D$(grep -n inherit $i | grep -v ':#' | cut -d: -f1 | tail -n1)
  if [[ $LINE1 -lt $LINE2 ]]; then
    echo $i $LINE1 $LINE2
  fi
done

Manual checking of the two results showed false positives.

--=20
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

--k+w/mQv8wyuph6w0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEABECAAYFAkmzVfsACgkQXVaO67S1rttdlACg6ZX9aMvE7+f5+MWL186dHKwH
5JwAoItF9F2F4YrZZ5E31Co0jpErDHEB
=rm//
-----END PGP SIGNATURE-----

--k+w/mQv8wyuph6w0--