From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 0306B731C4 for ; Mon, 4 Jan 2016 17:33:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u04HXTh7011570 for ; Mon, 4 Jan 2016 17:33:29 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gN-ZPAbUn4Sl for ; Mon, 4 Jan 2016 17:33:29 +0000 (GMT) Received: from hex ([192.168.3.34]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id u04HXQBn011567 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 4 Jan 2016 17:33:27 GMT Message-ID: <1451928806.7598.15.camel@linuxfoundation.org> From: Richard Purdie To: bitbake-devel Date: Mon, 04 Jan 2016 17:33:26 +0000 X-Mailer: Evolution 3.16.5-1ubuntu3.1 Mime-Version: 1.0 Subject: [PATCH] data: Drop misleading ExpansionError exception X-BeenThere: bitbake-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussion that advance bitbake development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 17:33:29 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This codepath can be triggered by a python indentation error for example. Showing it as an ExpansionError is misleading. Change the code to add a warning about where the failure came from (in particular giving the variable key name that triggered it) but raise the proper exception. Signed-off-by: Richard Purdie diff --git a/bitbake/lib/bb/data.py b/bitbake/lib/bb/data.py index dc8d02e..fac57da 100644 --- a/bitbake/lib/bb/data.py +++ b/bitbake/lib/bb/data.py @@ -406,7 +406,8 @@ def build_dependencies(key, keys, shelldeps, varflagsexcl, d): deps |= set((vardeps or "").split()) deps -= set(varflags.get("vardepsexclude", "").split()) except Exception as e: - raise bb.data_smart.ExpansionError(key, None, e) + bb.warn("Exception during build_dependencies for %s" % key) + raise return deps, value #bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs))) #d.setVarFlag(key, "vardeps", deps)