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.ran...@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@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto