Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] sanity.bbclass: Improved error message
@ 2017-01-12 19:24 Juro Bystricky
  2017-01-12 21:42 ` Richard Purdie
  0 siblings, 1 reply; 6+ messages in thread
From: Juro Bystricky @ 2017-01-12 19:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: jurobystricky

When a non-existing MACHINE is specified, sanity check issues
the following message:

    Please set a valid MACHINE in your local.conf or environment

However, MACHINE can also be set in multiconfig .conf file(s).
Hence we may have several different MACHINE settings within one
(multiconfig) build, so the present error message is fairly
ambiguous.

This patch remedies this by explicitly naming the offending MACHINE and
adding conf/multiconfig/*.conf to the list of places where this erroneous
MACHINE definition could have originated.

    Invalid MACHINE=xyz. Please set a valid MACHINE in your local.conf, conf/multiconfig/*.conf or environment

[YOCTO#10810]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index c876dc6..8477d38 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -823,7 +823,7 @@ def check_sanity_everybuild(status, d):
     machinevalid = True
     if d.getVar('MACHINE'):
         if not check_conf_exists("conf/machine/${MACHINE}.conf", d):
-            status.addresult('Please set a valid MACHINE in your local.conf or environment\n')
+            status.addresult('Invalid MACHINE=%s. Please set a valid MACHINE in your local.conf, conf/multiconfig/*.conf or environment\n' % (d.getVar('MACHINE')))
             machinevalid = False
         else:
             status.addresult(check_sanity_validmachine(d))
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-13  1:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-12 19:24 [PATCH] sanity.bbclass: Improved error message Juro Bystricky
2017-01-12 21:42 ` Richard Purdie
2017-01-12 21:49   ` Bystricky, Juro
2017-01-12 22:04   ` Mark Hatle
2017-01-13  0:36     ` Paul Eggleton
2017-01-13  1:03       ` Mark Hatle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox