Fix the FEATURES=parse-eapi-ebuild-head regex to handle comments on the same
authorZac Medico <zmedico@gentoo.org>
Wed, 5 Aug 2009 00:27:15 +0000 (00:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 5 Aug 2009 00:27:15 +0000 (00:27 -0000)
line, like this:

EAPI=2 #foo

Thanks to Markus Meier <maekke@gentoo.org> for reporting.

svn path=/main/trunk/; revision=13916

pym/portage/__init__.py

index ca27643358117ea51aa63bc5b555c92a0200cf39..c17b0c6d5de08f1e6bae9213182350e7f479c11e 100644 (file)
@@ -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):