aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKonrad Weihmann <kweihmann@outlook.com>2020-06-18 21:15:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-23 12:30:44 +0100
commitbfd729cfe06351ccd0071004e23af1d04546c723 (patch)
tree5635b8c56609f5eb0f4622276df7a9c3d749d364 /lib
parent232471083d6c574c7ada6320f9379ad7d7862a9c (diff)
downloadbitbake-bfd729cfe06351ccd0071004e23af1d04546c723.tar.gz
cookerdata: Add BBFILES_DYNAMIC inverse mode
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/cookerdata.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 472423fdc..24bf09c56 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -387,10 +387,13 @@ 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))
+ bb.fatal("BBFILES_DYNAMIC entries must be of the form {!}<collection name>:<filename pattern>, not:\n %s" % "\n ".join(invalid))
layerseries = set((data.getVar("LAYERSERIES_CORENAMES") or "").split())
collections_tmp = collections[:]