[yocto] [yocto-autobuilder][PATCH] GetLayerVersion.py: set new layer version only if cmd was sucessful and not already set
Flanagan, Elizabeth
elizabeth.flanagan at intel.com
Thu May 26 07:15:27 PDT 2016
Ok, this looks right. Let me test it and then pull.
On 25 May 2016 at 21:28, Bill Randle <william.c.randle at intel.com> wrote:
> Fixed a bug where GetLayerVersion set the layerversion to -1 when a
> meta-poky layer.conf was not found.
>
> Signed-off-by: Bill Randle <william.c.randle at intel.com>
> ---
> .../autobuilder/buildsteps/GetLayerVersion.py | 15 ++++++---------
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/GetLayerVersion.py b/lib/python2.7/site-packages/autobuilder/buildsteps/GetLayerVersion.py
> index de5c203..3f167e8 100644
> --- a/lib/python2.7/site-packages/autobuilder/buildsteps/GetLayerVersion.py
> +++ b/lib/python2.7/site-packages/autobuilder/buildsteps/GetLayerVersion.py
> @@ -44,15 +44,12 @@ class GetLayerVersion(ShellCommand):
> ShellCommand.start(self)
>
> def commandComplete(self, cmd):
> - result = cmd.logs['stdio'].getText()
> - layerv= result.replace("LAYERVERSION_" + self.layerfile, "").replace("=","").replace(' ','').replace('"','').replace("'",'').strip()
> - if cmd.didFail():
> - layerv = "-1"
> - if self.getProperty('layerversion_' + self.layerfile):
> - self.finished(SUCCESS)
> - else:
> - self.setProperty('layerversion_' + self.layerfile, layerv, "Setting Layer Version")
> - self.finished(SUCCESS)
> + if not cmd.didFail():
> + result = cmd.logs['stdio'].getText()
> + layerv = result.replace("LAYERVERSION_" + self.layerfile, "").replace("=","").replace(' ','').replace('"','').replace("'",'').strip()
> + if not self.getProperty('layerversion_' + self.layerfile):
> + self.setProperty('layerversion_' + self.layerfile, layerv, "Setting Layer Version")
> + self.finished(SUCCESS)
>
> def getText(self, cmd, results):
> return ShellCommand.getText(self, cmd, results)
> --
> 2.5.5
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
--
Elizabeth Flanagan
Yocto Project
Build and Release
More information about the yocto
mailing list