All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1][resend] Add a syntax to unset variable from bitbake configuration file
@ 2016-08-23  9:44 Jérémy Rosen
  2016-08-23  9:44 ` [PATCH v2 1/1] add a syntax to clear variable Jérémy Rosen
  2016-09-06 10:44 ` [PATCH v2 0/1][resend] Add a syntax to unset variable from bitbake configuration file Jérémy Rosen
  0 siblings, 2 replies; 5+ messages in thread
From: Jérémy Rosen @ 2016-08-23  9:44 UTC (permalink / raw)
  To: bitbake-devel

While working on a Yocto project I had a need to reactivate a task that was
disabled (do_fetch[noexec]="1") Currently, bitbake does not check the value
of the noexec flag but only if the flag is set. The only way to unset a flag
is to use an inline python syntax like the one below

python () {
   d.delVarFlag("do_fetch","noexec")
}

Using inline python to do something as simple as clearing a flag sounded too
complicated to me so I added a new keyword "unset" to bitbake with the
following syntax :

unset VAR

will call d.delVar("VAR")

unset VAR[flag]

will call d.delVarFlag("VAR","flag")

Documentation has been updated accordingly

---
v2 : fix some wording in documentation
     add unit test

Jérémy Rosen (1):
  add a syntax to clear variable

 bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml | 17 ++++-
 bitbake/lib/bb/parse/ast.py                                      | 33 +++++++-
 bitbake/lib/bb/parse/parse_py/ConfHandler.py                     | 12 +++-
 bitbake/lib/bb/tests/parse.py                                    | 17 ++++-
 4 files changed, 79 insertions(+), 0 deletions(-)

-- 
git-series 0.8.9


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-06 15:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23  9:44 [PATCH v2 0/1][resend] Add a syntax to unset variable from bitbake configuration file Jérémy Rosen
2016-08-23  9:44 ` [PATCH v2 1/1] add a syntax to clear variable Jérémy Rosen
2016-09-06 10:44 ` [PATCH v2 0/1][resend] Add a syntax to unset variable from bitbake configuration file Jérémy Rosen
2016-09-06 13:20   ` Richard Purdie
2016-09-06 15:25     ` Jérémy Rosen

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.