Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
@ 2015-02-02 10:30 Florian Boor
  2015-02-03 10:43 ` Paul Eggleton
  2015-02-03 12:04 ` Otavio Salvador
  0 siblings, 2 replies; 11+ messages in thread
From: Florian Boor @ 2015-02-02 10:30 UTC (permalink / raw)
  To: openembedded-core

An error in bitbake/OE context is something fatal and interrupts the build.
A deprecation warning is exactly what we have bb.warn for.

Signed-off-by: Florian Boor <florian.boor@kernelconcepts.de>
---
 meta/classes/base.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index de50be1..b5186bf 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -374,7 +374,7 @@ python () {
     # obsolete.  Return a warning to the user.
     princ = d.getVar('PRINC', True)
     if princ and princ != "0":
-        bb.error("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated.  The PR server should be used to automatically increment the PR.  See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
+        bb.warn("Use of PRINC %s was detected in the recipe %s (or one of its .bbappends)\nUse of PRINC is deprecated.  The PR server should be used to automatically increment the PR.  See: https://wiki.yoctoproject.org/wiki/PR_Service." % (princ, d.getVar("FILE", True)))
         pr = d.getVar('PR', True)
         pr_prefix = re.search("\D+",pr)
         prval = re.search("\d+",pr)
-- 
1.7.10.4



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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-02 10:30 [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification Florian Boor
@ 2015-02-03 10:43 ` Paul Eggleton
  2015-02-03 12:04 ` Otavio Salvador
  1 sibling, 0 replies; 11+ messages in thread
From: Paul Eggleton @ 2015-02-03 10:43 UTC (permalink / raw)
  To: Florian Boor; +Cc: openembedded-core

Hi Florian,

On Monday 02 February 2015 11:30:41 Florian Boor wrote:
> An error in bitbake/OE context is something fatal and interrupts the build.
> A deprecation warning is exactly what we have bb.warn for.

Out of interest, which layer are you including that needs fixing? Can we poke 
the layer maintainer to remove all references to PRINC?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-02 10:30 [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification Florian Boor
  2015-02-03 10:43 ` Paul Eggleton
@ 2015-02-03 12:04 ` Otavio Salvador
  2015-02-03 12:36   ` Florian Boor
  1 sibling, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2015-02-03 12:04 UTC (permalink / raw)
  To: Florian Boor; +Cc: Patches and discussions about the oe-core layer

On Mon, Feb 2, 2015 at 8:30 AM, Florian Boor
<florian.boor@kernelconcepts.de> wrote:
> An error in bitbake/OE context is something fatal and interrupts the build.
> A deprecation warning is exactly what we have bb.warn for.
>
> Signed-off-by: Florian Boor <florian.boor@kernelconcepts.de>

The PRINC support has been dropped so it indeed has to raise an error.
The layer you are using needs to be fixed instead.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 12:04 ` Otavio Salvador
@ 2015-02-03 12:36   ` Florian Boor
  2015-02-03 12:40     ` Burton, Ross
  0 siblings, 1 reply; 11+ messages in thread
From: Florian Boor @ 2015-02-03 12:36 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

Hi all,

On 03.02.2015 13:04, Otavio Salvador wrote:
> The PRINC support has been dropped so it indeed has to raise an error.
> The layer you are using needs to be fixed instead.

well, in this case the patch is wrong but we *must* raise a fatal error.

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 12:36   ` Florian Boor
@ 2015-02-03 12:40     ` Burton, Ross
  2015-02-03 12:50       ` Florian Boor
  0 siblings, 1 reply; 11+ messages in thread
From: Burton, Ross @ 2015-02-03 12:40 UTC (permalink / raw)
  To: Florian Boor
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

On 3 February 2015 at 12:36, Florian Boor <florian.boor@kernelconcepts.de>
wrote:

> well, in this case the patch is wrong but we *must* raise a fatal error.
>

bb.error is fatal, so it's all good right?

Ross

[-- Attachment #2: Type: text/html, Size: 639 bytes --]

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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 12:40     ` Burton, Ross
@ 2015-02-03 12:50       ` Florian Boor
  2015-02-03 12:53         ` Otavio Salvador
  0 siblings, 1 reply; 11+ messages in thread
From: Florian Boor @ 2015-02-03 12:50 UTC (permalink / raw)
  To: Burton, Ross
  Cc: Otavio Salvador, Patches and discussions about the oe-core layer

Hi Ross,

On 03.02.2015 13:40, Burton, Ross wrote:
> bb.error is fatal, so it's all good right?

last time I checked (some days ago) it was not necessarily fatal. I was able to
build complete image collecting a pile of PR_INC errors. That's what confused me...
I'll check if I still have the log on another machine later.

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 12:50       ` Florian Boor
@ 2015-02-03 12:53         ` Otavio Salvador
  2015-02-03 13:00           ` Burton, Ross
  0 siblings, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2015-02-03 12:53 UTC (permalink / raw)
  To: Florian Boor; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 3, 2015 at 10:50 AM, Florian Boor
<florian.boor@kernelconcepts.de> wrote:
> Hi Ross,
>
> On 03.02.2015 13:40, Burton, Ross wrote:
>> bb.error is fatal, so it's all good right?
>
> last time I checked (some days ago) it was not necessarily fatal. I was able to
> build complete image collecting a pile of PR_INC errors. That's what confused me...
> I'll check if I still have the log on another machine later.

Florian has a point here. We should use 'bb.fatal' and abort all build
as soon as possible.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 12:53         ` Otavio Salvador
@ 2015-02-03 13:00           ` Burton, Ross
  2015-02-03 13:02             ` Otavio Salvador
  2015-02-03 13:24             ` Florian Boor
  0 siblings, 2 replies; 11+ messages in thread
From: Burton, Ross @ 2015-02-03 13:00 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

On 3 February 2015 at 12:53, Otavio Salvador <otavio@ossystems.com.br>
wrote:

> > last time I checked (some days ago) it was not necessarily fatal. I was
> able to
> > build complete image collecting a pile of PR_INC errors. That's what
> confused me...
> > I'll check if I still have the log on another machine later.
>
> Florian has a point here. We should use 'bb.fatal' and abort all build
> as soon as possible.
>

Its an error in a specific recipe, so why should that abandon the build
immediately?

Ross

[-- Attachment #2: Type: text/html, Size: 919 bytes --]

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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 13:00           ` Burton, Ross
@ 2015-02-03 13:02             ` Otavio Salvador
  2015-02-03 13:20               ` Richard Purdie
  2015-02-03 13:24             ` Florian Boor
  1 sibling, 1 reply; 11+ messages in thread
From: Otavio Salvador @ 2015-02-03 13:02 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 3, 2015 at 11:00 AM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 3 February 2015 at 12:53, Otavio Salvador <otavio@ossystems.com.br>
> wrote:
>>
>> > last time I checked (some days ago) it was not necessarily fatal. I was
>> > able to
>> > build complete image collecting a pile of PR_INC errors. That's what
>> > confused me...
>> > I'll check if I still have the log on another machine later.
>>
>> Florian has a point here. We should use 'bb.fatal' and abort all build
>> as soon as possible.
>
>
> Its an error in a specific recipe, so why should that abandon the build
> immediately?

It ends changing the content of the recipe and might raise a rebuild
of several things. Which ends being invalid as PRINC would make an
error in the end. So why not fail soon and ensure it is act upon it
ASAP?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 13:02             ` Otavio Salvador
@ 2015-02-03 13:20               ` Richard Purdie
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Purdie @ 2015-02-03 13:20 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On Tue, 2015-02-03 at 11:02 -0200, Otavio Salvador wrote:
> On Tue, Feb 3, 2015 at 11:00 AM, Burton, Ross <ross.burton@intel.com> wrote:
> >
> > On 3 February 2015 at 12:53, Otavio Salvador <otavio@ossystems.com.br>
> > wrote:
> >>
> >> > last time I checked (some days ago) it was not necessarily fatal. I was
> >> > able to
> >> > build complete image collecting a pile of PR_INC errors. That's what
> >> > confused me...
> >> > I'll check if I still have the log on another machine later.
> >>
> >> Florian has a point here. We should use 'bb.fatal' and abort all build
> >> as soon as possible.
> >
> >
> > Its an error in a specific recipe, so why should that abandon the build
> > immediately?
> 
> It ends changing the content of the recipe and might raise a rebuild
> of several things. Which ends being invalid as PRINC would make an
> error in the end. So why not fail soon and ensure it is act upon it
> ASAP?

It errors during parsing which stops the build going any further. It
doesn't really matter whether its a bb.fatal or bb.error, both would
have the same effect here which is to stop the build at parse time.

It used to be a bb.warn(), people ignored it. Personally I'd like to
drop the thing entirely but people wanted an error so we have that now
for this release. We're not changing it back to a warn().

Cheers,

Richard



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

* Re: [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
  2015-02-03 13:00           ` Burton, Ross
  2015-02-03 13:02             ` Otavio Salvador
@ 2015-02-03 13:24             ` Florian Boor
  1 sibling, 0 replies; 11+ messages in thread
From: Florian Boor @ 2015-02-03 13:24 UTC (permalink / raw)
  To: Burton, Ross, Otavio Salvador
  Cc: Patches and discussions about the oe-core layer

Hi,

On 03.02.2015 14:00, Burton, Ross wrote:

> Its an error in a specific recipe, so why should that abandon the build
> immediately?   

hum... looks like we have different ideas of what is 'fatal' :-)
I would abandon it because the result might not meet the users expectations.
Apart from the fact that we should behave consistent with other recipe errors
(e.g. parse errors) which are always fatal for a build.

Greetings

Florian

-- 
The dream of yesterday                  Florian Boor
is the hope of today                    Tel: +49 271-771091-15
and the reality of tomorrow.            Fax: +49 271-771091-19
[Robert Hutchings Goddard, 1904]        florian.boor@kernelconcepts.de
                                        http://www.kernelconcepts.de/en


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

end of thread, other threads:[~2015-02-03 13:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-02 10:30 [PATCH] base.bbclass: Use bb.warn instead of bb.error for deprecation notification Florian Boor
2015-02-03 10:43 ` Paul Eggleton
2015-02-03 12:04 ` Otavio Salvador
2015-02-03 12:36   ` Florian Boor
2015-02-03 12:40     ` Burton, Ross
2015-02-03 12:50       ` Florian Boor
2015-02-03 12:53         ` Otavio Salvador
2015-02-03 13:00           ` Burton, Ross
2015-02-03 13:02             ` Otavio Salvador
2015-02-03 13:20               ` Richard Purdie
2015-02-03 13:24             ` Florian Boor

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