All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] BBFILES_DYNAMIC: add inverse mode
@ 2020-04-30 19:07 Konrad Weihmann
  0 siblings, 0 replies; only message in thread
From: Konrad Weihmann @ 2020-04-30 19:07 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Konrad Weihmann

Add an inverse mode for BBFILES_DYNAMIC.
Entries where the layername is prefix with '!' will act in inverted mode
including given glob mask in absence of the referenced layer.
This is useful to backfill recipes from potentially missing layer.

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
---
 lib/bb/cookerdata.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 472423fd..bf72a8b3 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -387,7 +387,10 @@ class CookerDataBuilder(object):
                     invalid.append(entry)
                     continue
                 l, f = parts
-                if l in collections:
+                invert = l[0] == "!"
+                if invert:
+                    l = l[1:]
+                if (l in collections and not invert) or (l not in collections and invert):
                     data.appendVar("BBFILES", " " + f)
             if invalid:
                 bb.fatal("BBFILES_DYNAMIC entries must be of the form <collection name>:<filename pattern>, not:\n    %s" % "\n    ".join(invalid))
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-30 19:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 19:07 [PATCH v2] BBFILES_DYNAMIC: add inverse mode Konrad Weihmann

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.