From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 93-97-173-237.zone5.bethere.co.uk ([93.97.173.237] helo=tim.rpsys.net) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgxvt-00075X-Bi for bitbake-devel@lists.openembedded.org; Fri, 07 Dec 2012 14:25:37 +0100 Received: from localhost (localhost [127.0.0.1]) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id qB7DBA7k005690 for ; Fri, 7 Dec 2012 13:11:10 GMT Received: from tim.rpsys.net ([127.0.0.1]) by localhost (tim.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32660-10 for ; Fri, 7 Dec 2012 13:11:06 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by tim.rpsys.net (8.13.6/8.13.8) with ESMTP id qB7DB0Fl005684 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 7 Dec 2012 13:11:01 GMT Message-ID: <1354885851.12928.25.camel@ted> From: Richard Purdie To: bitbake-devel Date: Fri, 07 Dec 2012 13:10:51 +0000 X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 X-Virus-Scanned: amavisd-new at rpsys.net Subject: [PATCH] BBHandler: Ensure parser state engine is correctly reset for new parsing X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2012 13:25:37 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The classes variable in particular could be in an odd state if parsing of a previous recipe had abruptly ended. Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 2e0647b..c4e579d 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py @@ -107,14 +107,15 @@ def get_statements(filename, absolute_filename, base_name): return statements def handle(fn, d, include): - global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__ + global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __infunc__, __body__, __residue__, __inpython__, classes __body__ = [] __infunc__ = "" __classname__ = "" __residue__ = [] - + __inpython__ = False if include == 0: + classes = [ None, ] logger.debug(2, "BB %s: handle(data)", fn) else: logger.debug(2, "BB %s: handle(data, include)", fn)