Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: Zac Medico <zmedico@g.o>
Subject: Re: [PATCH] repoman: add a mini framework for checking eclasses, and fill it out
Date: Wed, 23 May 2012 21:01:06 -0700
On 05/23/2012 08:15 PM, Mike Frysinger wrote:
> On Wednesday 23 May 2012 15:21:51 Mike Frysinger wrote:
>> +		self._inherit_re = re.compile(r'^\s*inherit\s(.*\s)?%s(\s|$)' %
> 
> in scanning the whole tree, this seems to cause some issues (not new) with 
> extended constructs and not detecting this ebuilds inherits an eclass 
> directly.  some examples:
> 
> (1)
> 	foo="autotools"
> 	...
> 	inherit ${foo}
> this seems pointless imo since we've already ruled that multiple `inherit` 
> calls are OK

Seems reasonable.

> (2)
> 	inherit ... \
> 		autotools
> this is annoying.  maybe we should adapt the core line code to unroll these 
> before passing to the individual checks ?

Yeah, we could do that for all escaped newlines (not just the ones
involving inherit).

> (3)
> 	[[ ${PV} == "9999" ]] && inherit autotools
> this one would require tweaking the regex like so:
> 	(^[[:space:]]*|[[:space:]])inherit

Maybe use something like (^[[:space:]]*|[|&]+[[:space:]]*)\b(inherit)
like I did here:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a8889947c45a9fa81ca006b333466372b64f0344

That way it's less likely to match the word "inherit" inside of a
comment or quoted string.
-- 
Thanks,
Zac


References:
[PATCH] repoman: add a mini framework for checking eclasses, and fill it out
-- Mike Frysinger
Re: [PATCH] repoman: add a mini framework for checking eclasses, and fill it out
-- Mike Frysinger
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PATCH] repoman: add a mini framework for checking eclasses, and fill it out
Next by thread:
[PATCH v2] repoman: add a mini framework for checking eclasses, and fill it out
Previous by date:
Re: [PATCH] repoman: add a mini framework for checking eclasses, and fill it out
Next by date:
[RFC/PATCH] repoman: unroll escaped lines so we can check the entirety of it


Updated Jun 13, 2012

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.