From: Zac Medico Date: Wed, 5 Aug 2009 00:27:15 +0000 (-0000) Subject: Fix the FEATURES=parse-eapi-ebuild-head regex to handle comments on the same X-Git-Tag: v2.2_rc36~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa496b7c10c9c059af90fa9c16a1a5ba8e21db6f;p=portage.git Fix the FEATURES=parse-eapi-ebuild-head regex to handle comments on the same line, like this: EAPI=2 #foo Thanks to Markus Meier for reporting. svn path=/main/trunk/; revision=13916 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ca2764335..c17b0c6d5 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5275,7 +5275,7 @@ def eapi_is_supported(eapi): # the ebuild. _validate_cache_for_unsupported_eapis = True -_parse_eapi_ebuild_head_re = re.compile(r'^EAPI=[\'"]?([^\'"]*)') +_parse_eapi_ebuild_head_re = re.compile(r'^EAPI=[\'"]?([^\'"#]*)') _parse_eapi_ebuild_head_max_lines = 30 def _parse_eapi_ebuild_head(f):