From: "Randle, William C" <william.c.randle@intel.com>
To: "randy.e.witt@linux.intel.com" <randy.e.witt@linux.intel.com>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: [yocto-autobuilder][PATCH] GetLayerVersion.py: set new layer version only if cmd was sucessful and not already set
Date: Wed, 25 May 2016 21:12:24 +0000 [thread overview]
Message-ID: <1464210744.2802.9.camel@intel.com> (raw)
In-Reply-To: <c14a55a9-6398-8fb5-4aaf-9ef611c2d376@linux.intel.com>
On Wed, 2016-05-25 at 14:03 -0700, Randy Witt wrote:
> On 05/25/2016 01:28 PM, Bill Randle 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@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)
> What happens if the command actually failed?
It just sets SUCCESS and carries on. What's going on is that the code that calls
this is iterating over different layers, starting with meta-poky, then meta-
yocto. When building a version prior to the meta-yocto -> meta-poky transition,
it will fail to find meta-poky/conf/layer.conf, but it's ok, because it will
next try meta-yocto/conf/layer.conf and succeed.
What was going on before is that on failure, if the layerversion was not
previouisly set, it would get set to -1 on that failure and not get overriden by
the correct version in meta-yocto/conf.
-Bill
next prev parent reply other threads:[~2016-05-25 21:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 20:28 [yocto-autobuilder][PATCH] GetLayerVersion.py: set new layer version only if cmd was sucessful and not already set Bill Randle
2016-05-25 21:03 ` Randy Witt
2016-05-25 21:12 ` Randle, William C [this message]
2016-05-26 14:15 ` Flanagan, Elizabeth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464210744.2802.9.camel@intel.com \
--to=william.c.randle@intel.com \
--cc=randy.e.witt@linux.intel.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.