diff options
author | Chris Larson <clarson@kergoth.com> | 2005-02-09 23:41:53 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2005-02-09 23:41:53 +0000 |
commit | c25445d4276ddbc7c1dee0b64de0b04bd402cf26 (patch) | |
tree | 42a4347f9b763df6a3c128ef11472988a39c3874 /classes/base.bbclass | |
parent | 27250f9299203db029bf9e6ccd3ca7bb37868b5f (diff) |
Merge oe-devel@oe-devel.bkbits.net:openembedded
into odin.sc.ti.com:/home/kergoth/code/user/oe/openembedded
2005/02/09 17:41:25-06:00 ti.com!kergoth
- At the beginning of a build, display an 'OE Build Configuration',
showing some important variables and their values, to make it easy
to spot an incorrect setup.
- Change the default TARGET_ARCH and TARGET_OS to no longer be the BUILD
versions. It used to make sense, given the primary configuration file
resided in the core. Now that its in our metadata, we can change that,
and also make the build abort with an obvious error if either are not set.
BKrev: 420a9fc1QNq7YE9IOvWAuHnCbfBZuw
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r-- | classes/base.bbclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index a2ed7a76be..e6f8e43fd6 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -491,6 +491,23 @@ python base_eventhandler() { elif name == "UnsatisfiedDep": msg += "package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()) note(msg) + + if name.startswith("BuildStarted"): + statusvars = ['TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', + 'TARGET_FPU'] + statuslines = ["%-13s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars] + statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines) + print statusmsg + + needed_vars = [ "TARGET_ARCH", "TARGET_OS" ] + pesteruser = [] + for v in needed_vars: + val = bb.data.getVar(v, e.data, 1) + if not val or val == 'INVALID': + pesteruser.append(v) + if pesteruser: + bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser)) + if not data in e.__dict__: return NotHandled @@ -499,6 +516,7 @@ python base_eventhandler() { logfile = file(log, "a") logfile.write("%s\n" % msg) logfile.close() + return NotHandled } |