From bb9e38171a234551bf51fc2885b8e3238c409431 Mon Sep 17 00:00:00 2001 From: Konrad Weihmann Date: Thu, 18 Jun 2020 21:15:52 +0200 Subject: bitbake: 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. (Bitbake rev: bfd729cfe06351ccd0071004e23af1d04546c723) Signed-off-by: Konrad Weihmann Signed-off-by: Richard Purdie --- bitbake/lib/bb/cookerdata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 472423fdc8..24bf09c56b 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/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 :, not:\n %s" % "\n ".join(invalid)) + bb.fatal("BBFILES_DYNAMIC entries must be of the form {!}:, not:\n %s" % "\n ".join(invalid)) layerseries = set((data.getVar("LAYERSERIES_CORENAMES") or "").split()) collections_tmp = collections[:] -- cgit v1.2.3-54-g00ecf