Reputation: 416
I have a recipe that does a check during parsing. What I would like to do is instead of issuing a warning or stopping with an error, I would like to make yocto completely ignore the recipe as if it was never there. It could still error out if some other recipe RDEPENDS
on it, but otherwise parsing would be successful.
Is this possible to do?
Upvotes: 4
Views: 15936
Reputation: 1386
Yes, you can, by raising bb.parse.SkipRecipe exception
python() {
...
if ... :
raise bb.parse.SkipRecipe("Message")
...
}
I don't find it well documented, but google does return some assuring results for this.
Upvotes: 1
Reputation: 1929
EDIT: I don't see a way to do it.
But you can "hide" specific recipe(s) using the BBMASK
variable. The value is regexp for masking specific files or paths. You can also mask a whole directory.
We are using that mechanism and the variable is set in configuration file (distro configuration in our case, but it may be in a different configuration file).
You can find more information in the documentation for that variable: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-BBMASK
Some examples copied from the linked documentation:
BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
BBMASK += "/meta-oe/recipes-support/"
BBMASK += "/meta-foo/.*/openldap"
BBMASK += "opencv.*\.bbappend"
BBMASK += "lzma"
Upvotes: 9
Reputation: 380
When bitbake launches, it first parses everything it can in order to figure out what does it have and are there any obvious errors. Only after this stage it analyzes what have you asked it to do. So if you have syntax errors there is no other way to avoid it except don't add the layer that contains invalid recipe to bblayers.conf.
Upvotes: 0