Yocto BBMASK: Diagnose a Recipe or Append Removed Before Parsing
A recipe disappears from a Yocto build after a configuration cleanup. Changing its preferred version has no effect. Alternatively, the recipe still builds but a product append no longer contributes its settings. Before investigating provider selection, check whether BBMASK removed the relevant metadata file from consideration.
Masking operates on recipe and append paths before they are parsed. A broad expression can therefore hide more than the maintainer intended without producing an error inside the hidden file.
Match the full path, not a package name
The BBMASK reference defines values as Python regular expressions matched against full paths. They are not shell globs and are not lists of package names.
For an illustrative directory named recipes-demo, a pattern containing recipes-demo can also match recipes-demo-extra. Adding the directory separator, as in /recipes-demo/, makes that particular boundary explicit. Whether that scope is correct still depends on the complete path layout.
Likewise, sensor.* does not mean “the literal filename sensor followed by any extension” in the same way a shell pattern is often read. The dot is a regular-expression operator. Use escaped punctuation where literal characters are required, and inspect both positive and negative examples.
The Python regular-expression documentation distinguishes searching anywhere in a string from matching only at its start. This matters because a path component unrelated to the recipe's basename can satisfy a broad search pattern.
Understand where BitBake removes the file
The examined BitBake collection implementation compiles mask fragments, combines them, and tests candidate paths with search. A matching file is skipped before the remaining files are classified into recipes and appends.
That sequence explains two different symptoms. Masking a .bb removes a recipe candidate. Masking only its .bbappend can leave the base recipe available while silently removing the product customization from that recipe's parsed metadata.
An illustrative append-only expression might end with sensor-agent_.*\.bbappend$. The escaped dot and end anchor constrain the suffix; the preceding directory scope should constrain the intended layer. Do not copy a broad basename expression into a multi-layer configuration without checking every matching path.

Test the expression against neighboring files
Construct a small list using the actual checkout paths: the intended file, another version, an append, a similarly named recipe and the same basename in another layer. Evaluate each mask with Python's regular-expression search behavior and write down which paths should be hidden.
This is a proposed expression test, not a replacement for BitBake parsing. It is especially useful for catching an accidental alternation, unescaped dot or missing directory boundary before running a large build.
Then inspect the final global BBMASK value with bitbake -e, including its assignment history. Several configuration fragments may append patterns. Testing only the line that was most recently edited misses earlier expressions that still hide the file.
If a fragment is invalid, read the diagnostic rather than guessing that the entire mask list was discarded. The examined implementation validates individual fragments before constructing the combined expression. Repair the invalid pattern and re-evaluate the complete effective value.
Re-establish visibility before changing preferences
After narrowing the mask, use the layer-management commands to inspect available recipes and applicable appends. bitbake-layers show-recipes and bitbake-layers show-appends answer different parts of that check.
For the append case, inspect the resulting recipe metadata for one specific setting the append contributes. A file appearing on disk is insufficient; the expected customization must participate again.
If the recipe remains absent after the mask no longer matches, investigate discovery through BBFILES, layer configuration or compatibility skips. If it is visible but a different provider wins, investigate provider selection. Those are later or different boundaries, and changing preferences cannot select a file already excluded by the mask.
Keep the final expression narrow enough to survive a new neighboring recipe. A useful regression is a future-looking negative case: a similar basename or adjacent directory that must remain visible after the mask is applied.