From dc39ebe91eabc48517aaac98655e50c7b1702262 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 14 Apr 2010 14:27:29 -0700 Subject: Move the unset BBPATH sanity check after the bblayers processing This way we can fully utilize bblayers, you can do everything in bblayers.conf and avoid setting any environment variables at all. (Bitbake rev: 5def1c8c31432968349f9b29d6333d7962260a8b) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 3 +++ bitbake/lib/bb/parse/parse_py/ConfHandler.py | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index eaee797cb5..eab95d0336 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -530,6 +530,9 @@ class BBCooker: bb.data.delVar('LAYERDIR', data) + if not data.getVar("BBPATH", True): + bb.fatal("The BBPATH variable is not set") + data = bb.parse.handle(os.path.join("conf", "bitbake.conf"), data) self.configuration.data = data diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 9188119e4d..9128a2ef8f 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -37,10 +37,7 @@ __export_regexp__ = re.compile( r"export\s+(.+)" ) def init(data): topdir = bb.data.getVar('TOPDIR', data) if not topdir: - topdir = os.getcwd() - bb.data.setVar('TOPDIR', topdir, data) - if not bb.data.getVar('BBPATH', data): - bb.msg.fatal(bb.msg.domain.Parsing, "The BBPATH environment variable must be set") + bb.data.setVar('TOPDIR', os.getcwd(), data) def supports(fn, d): -- cgit v1.2.3-54-g00ecf