All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Paul Eggleton <paul.eggleton@linux.intel.com>,
	Gary Thomas <gary@mlbassoc.com>
Cc: yocto@yoctoproject.org
Subject: Re: Change in override behavior?
Date: Tue, 24 May 2016 13:31:40 +0100	[thread overview]
Message-ID: <1464093100.9570.54.camel@linuxfoundation.org> (raw)
In-Reply-To: <4240230.kXqFvlgrOF@peggleto-mobl.ger.corp.intel.com>

On Fri, 2016-04-29 at 22:09 +1200, Paul Eggleton wrote:
> On Fri, 29 Apr 2016 12:00:58 Gary Thomas wrote:
> > On 2016-04-29 11:51, Paul Eggleton wrote:
> > > On Fri, 29 Apr 2016 09:24:23 Gary Thomas wrote:
> > > > On 2016-04-29 09:16, Paul Eggleton wrote:
> > > > Indeed, my machine names do have an upper case letter in them.
> > > > Any suggestions for how to handle this (short of renaming
> > > > everything
> > > > which
> > > > would be a HUGE chore)?
> > > 
> > > It's no longer supported I'm afraid, BitBake's datastore is now
> > > coded to
> > > expect lowercase for all override values. You say it's a huge
> > > chore but
> > > surely a grep -l | xargs -n1 sed -i would do it?
> > 
> > If I were to rename my target (MACHINE), I'd then have to go
> > through
> > and rename all of the directories in the recipes that hold machine
> > customizations and there are quite a few of those.  Similarly I'd
> > have to rework all the recipes that use the old names (with upper
> > case
> > letters) to the new ones.  Not impossible, but quite a lot of work.
> 
> That is unfortunate, but again should be pretty easy to automate
> (assuming 
> they are local of course and not proliferated across many users'
> build 
> machines).
> 
> > Short of actually renaming the target machines, I could add an
> > additional
> > override (in <MACHINE>.conf) that is lowercase only and update just
> > the
> > recipes to use that instead.
> > 
> > By experimentation, I have found that XYZ_append_<MACHINE> seems to
> > do
> > the correct thing, even when <MACHINE> has upper case letters. 
> >  Maybe this
> > is an oversight that will be fixed?
> 
> I'm not sure - Richard?

Sorry for the delay in getting to this. It does sound like there is a
codepath in bitbake which is still recognising variables with mixed
case. I took a quick look and think this change appears to address it:

diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 25c412c..ec6709f 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -39,7 +39,7 @@ from bb.COW  import COWDictBase
 logger = logging.getLogger("BitBake.Data")
 
 __setvar_keyword__ = ["_append", "_prepend", "_remove"]
-__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>.*))?$')
+__setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^A-Z]*))?$')
 __expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
 __expand_python_regexp__ = re.compile(r"\${@.+?}")


Cheers,

Richard


  parent reply	other threads:[~2016-05-24 12:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  4:24 Change in override behavior? Gary Thomas
2016-04-29  5:08 ` Paul Eggleton
2016-04-29  6:06   ` Gary Thomas
2016-04-29  7:16     ` Paul Eggleton
2016-04-29  7:24       ` Gary Thomas
2016-04-29  7:32         ` Gary Thomas
2016-04-29  9:51         ` Paul Eggleton
2016-04-29 10:00           ` Gary Thomas
2016-04-29 10:09             ` Paul Eggleton
2016-04-30  2:19               ` Khem Raj
2016-05-24 12:31               ` Richard Purdie [this message]
2016-06-03  1:43                 ` Andre McCurdy

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=1464093100.9570.54.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=gary@mlbassoc.com \
    --cc=paul.eggleton@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.