base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
PATCH 1/1 base.bbclass: Use bb.warn instead of bb.error for deprecation notification.
An error in bitbake/OE context is something fatal and interrupts the build. A deprecation warning is exactly what we have bb.warn for.
--- meta/classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/base.bbclass +1 -1
@@ -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)
Signature · 1 line
1.7.10.4
Hi Florian,
Quoted 2 lines · 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
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 4 lines · Florian Boor
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 <[email protected]>
The PRINC support has been dropped so it indeed has to raise an error. The layer you are using needs to be fixed instead.
Signature · 3 lines
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
Hi all,
Quoted 2 lines · Otavio Salvador
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
Signature · 5 lines
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] [email protected] http://www.kernelconcepts.de/en
Quoted 2 lines · Florian Boor
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
Hi Ross,
Quoted 1 line · Ross
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
Signature · 5 lines
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] [email protected] http://www.kernelconcepts.de/en
Quoted 8 lines · Florian Boor
Hi Ross,
Quoted 1 line · Ross
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_INCerrors. 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.
Signature · 3 lines
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
Quoted 9 lines · Otavio Salvador
Quoted 1 line
last time I checked (some days ago) it was not necessarily fatal. I was
able to
Quoted 1 line
build complete image collecting a pile of
PR_INCerrors. That's whatconfused me...
Quoted 1 line
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
Quoted 10 lines · Ross
Quoted 7 lines · Otavio Salvador
Quoted 6 lines
last time I checked (some days ago) it was not necessarily fatal. I was able to
build complete image collecting a pile ofPR_INCerrors. That's what confused me...
I'll check if I still have the log on another machine later.
Quoted 6 lines
Quoted 2 lines
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?
Signature · 3 lines
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
Quoted 15 lines · Otavio Salvador
Quoted 14 lines · Ross
Quoted 9 lines · Otavio Salvador
Quoted 6 lines
last time I checked (some days ago) it was not necessarily fatal. I was able to
build complete image collecting a pile ofPR_INCerrors. 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.
Quoted 7 lines
Quoted 2 lines
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
Hi,
Quoted 2 lines · Ross
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
Signature · 5 lines
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] [email protected] http://www.kernelconcepts.de/en