Bug #251616 - Inside _check_build_log(), remove unnecessary .* patterns from regular
authorZac Medico <zmedico@gentoo.org>
Fri, 19 Dec 2008 21:36:26 +0000 (21:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 19 Dec 2008 21:36:26 +0000 (21:36 -0000)
expressions. These patterns trigger extreme performance issues when matched against
extremely large lines such as those produced by dev-util/bzr test suite when it
uses \r to rewrite the same line thousands of times.

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

pym/portage/__init__.py

index fc42bd3af3f6cbe4fc73a6512386e132bb9e4b0e..1267efb902ae9c2a5b9c727dacc9aea4c43a4aba 100644 (file)
@@ -4572,10 +4572,10 @@ def _check_build_log(mysettings, out=None):
 
        configure_opts_warn = []
        configure_opts_warn_re = re.compile(
-               r'^configure: WARNING: Unrecognized options: .*')
-       am_maintainer_mode_re = re.compile(r'.*/missing --run .*')
+               r'^configure: WARNING: Unrecognized options: ')
+       am_maintainer_mode_re = re.compile(r'/missing --run ')
        am_maintainer_mode_exclude_re = \
-               re.compile(r'.*/missing --run (autoheader|makeinfo)')
+               re.compile(r'/missing --run (autoheader|makeinfo)')
 
        make_jobserver_re = \
                re.compile(r'g?make\[\d+\]: warning: jobserver unavailable:')