All of lore.kernel.org
 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

* Re: [PATCH] sanity.bbclass: Improved error message
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Purdie @ 2017-01-12 21:42 UTC (permalink / raw)
  To: Juro Bystricky, openembedded-core; +Cc: jurobystricky

On Thu, 2017-01-12 at 11:24 -0800, Juro Bystricky wrote:
> 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

Can we change this to:

"MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf,
environment or other configuration file."

I don't want to have to list all the possible places you could set
MACHINE.

Cheers,

Richard


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

* Re: [PATCH] sanity.bbclass: Improved error message
  2017-01-12 21:42 ` Richard Purdie
@ 2017-01-12 21:49   ` Bystricky, Juro
  2017-01-12 22:04   ` Mark Hatle
  1 sibling, 0 replies; 6+ messages in thread
From: Bystricky, Juro @ 2017-01-12 21:49 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: jurobystricky

No problem. Will send in patch V2 shortly.


> -----Original Message-----
> From: Richard Purdie [mailto:richard.purdie@linuxfoundation.org]
> Sent: Thursday, January 12, 2017 1:42 PM
> To: Bystricky, Juro <juro.bystricky@intel.com>; openembedded-
> core@lists.openembedded.org
> Cc: jurobystricky@hotmail.com
> Subject: Re: [PATCH] sanity.bbclass: Improved error message
> 
> On Thu, 2017-01-12 at 11:24 -0800, Juro Bystricky wrote:
> > 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
> 
> Can we change this to:
> 
> "MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf,
> environment or other configuration file."
> 
> I don't want to have to list all the possible places you could set
> MACHINE.
> 
> Cheers,
> 
> Richard

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

* Re: [PATCH] sanity.bbclass: Improved error message
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2017-01-12 22:04 UTC (permalink / raw)
  To: openembedded-core

On 1/12/17 3:42 PM, Richard Purdie wrote:
> On Thu, 2017-01-12 at 11:24 -0800, Juro Bystricky wrote:
>> 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
> 
> Can we change this to:
> 
> "MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf,
> environment or other configuration file."

I commented elsewhere as well -- but is there any way to see where MACHINE was
actually set and display that -- or is it limited to 'bitbake -e' usage?

--Mark

> I don't want to have to list all the possible places you could set
> MACHINE.
> 
> Cheers,
> 
> Richard
> 



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

* Re: [PATCH] sanity.bbclass: Improved error message
  2017-01-12 22:04   ` Mark Hatle
@ 2017-01-13  0:36     ` Paul Eggleton
  2017-01-13  1:03       ` Mark Hatle
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2017-01-13  0:36 UTC (permalink / raw)
  To: Mark Hatle; +Cc: openembedded-core

On Thu, 12 Jan 2017 16:04:09 Mark Hatle wrote:
> On 1/12/17 3:42 PM, Richard Purdie wrote:
> > On Thu, 2017-01-12 at 11:24 -0800, Juro Bystricky wrote:
> >> 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
> > 
> > Can we change this to:
> > 
> > "MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf,
> > environment or other configuration file."
> 
> I commented elsewhere as well -- but is there any way to see where MACHINE
> was actually set and display that -- or is it limited to 'bitbake -e'
> usage?

You need to have history enabled in the datastore to be able to retrieve that, 
and we don't during normal mode for performance over the entire run. It's 
possible we could enable it reparse the configuration when errors like this 
occur to get it though - it probably wouldn't take too long, but I don't know 
if there are other practical barriers.

Cheers,
Paul
-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH] sanity.bbclass: Improved error message
  2017-01-13  0:36     ` Paul Eggleton
@ 2017-01-13  1:03       ` Mark Hatle
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2017-01-13  1:03 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On 1/12/17 6:36 PM, Paul Eggleton wrote:
> On Thu, 12 Jan 2017 16:04:09 Mark Hatle wrote:
>> On 1/12/17 3:42 PM, Richard Purdie wrote:
>>> On Thu, 2017-01-12 at 11:24 -0800, Juro Bystricky wrote:
>>>> 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
>>>
>>> Can we change this to:
>>>
>>> "MACHINE=xyz is invalid. Please set a valid MACHINE in your local.conf,
>>> environment or other configuration file."
>>
>> I commented elsewhere as well -- but is there any way to see where MACHINE
>> was actually set and display that -- or is it limited to 'bitbake -e'
>> usage?
> 
> You need to have history enabled in the datastore to be able to retrieve that, 
> and we don't during normal mode for performance over the entire run. It's 
> possible we could enable it reparse the configuration when errors like this 
> occur to get it though - it probably wouldn't take too long, but I don't know 
> if there are other practical barriers.

Ok.. I couldn't remember if history was needed or not.  I know one of the
implementations included a history reference for the last one (instead of a full
history...)

It's not worth making this more difficult to implement then.

--Mark

> Cheers,
> Paul
> 



^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.