Skip to contentSkip to conversation

clarifying the variations of BBMASK

DISCUSSION Robert P. J. Day 2 participants 3 messages Nov 17, 2020 – Nov 27, 2020

lore
Share & tools
lore
#0 lore raw

as i've rarely needed to BBMASK stuff, i learned a couple things
today when a colleague brought me some masking that could use some highlighting in the docs, methinks.

first, all of his BBMASKing was of the form:

BBMASK += "|layer stuff ..."

that is, every value prefixed with "|". since the bitbake user manual does state that BBMASK supports Python REs, i guess it takes only a few seconds to realize that you *can* do that, or just leave spaces between patterns with:

BBMASK += "layer stuff ..."

a more obvious observation would be for the BB manual to actually show some examples that use "|" in a practical way, as none of the examples there do that.

what i did find surprising was that (apparently, and feel free to
correct me) wildcarding was automatically applied to the end of a string. i noticed this as my colleague was trying to BBMASK a directory named "protobuf", and specified:

BBMASK += "|.../protobuf"

not realizing that it would also mask the sibling directory "protobuf-rpc". the BB manual does indirectly hint at that issue, writing, "When specifying a directory name, use the trailing slash character to ensure you match just that directory name," but a good example of that would be, i think, straight out of oe-core, showing that:

BBMASK += ".../recipes-support/libcap"

would unfortunately also BBMASK libcap-ng (hence the caution to use a trailing slash to lock it to the directory name).

so as long as i've understood all this, that explanation in the BB
manual seems like it could use a couple more examples. or have i misread?

rday

#1 lore raw
Quoted 7 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Robert P. J. Day
Sent: den 17 november 2020 17:44
To: YP docs mailing list <[email protected]>
Subject: [docs] clarifying the variations of BBMASK

Quoted 7 lines

as i've rarely needed to BBMASK stuff, i learned a couple things
today when a colleague brought me some masking that could use some highlighting in the docs, methinks.

first, all of his BBMASKing was of the form:

BBMASK += "|layer stuff ..."

Using += with "|...." doesn't really make sense. Originally, BBMASK only supported a single regular expression, and you would then typically have to either use BBMASK .= "|..." or BBMASK_append = "|..." This was troublesome as you had to basically know if something had already added something to BBMASK to know whether you should use BBMASK = "..." or BBMASK .= "|...". So I changed that a couple of years ago so that it now supports multiple regular expressions. At the same time I rewrote the documentation to only use examples that use BBMASK += "..." as there is absolutely no reason to promote the old way of adding more regular expressions to BBMASK.

Quoted 25 lines

that is, every value prefixed with "|". since the bitbake user manual does state that BBMASK supports Python REs, i guess it takes only a few seconds to realize that you *can* do that, or just leave spaces between patterns with:

BBMASK += "layer stuff ..."

a more obvious observation would be for the BB manual to actually show some examples that use "|" in a practical way, as none of the examples there do that.

what i did find surprising was that (apparently, and feel free to
correct me) wildcarding was automatically applied to the end of a string. i noticed this as my colleague was trying to BBMASK a directory named "protobuf", and specified:

BBMASK += "|.../protobuf"

not realizing that it would also mask the sibling directory "protobuf-rpc". the BB manual does indirectly hint at that issue, writing, "When specifying a directory name, use the trailing slash character to ensure you match just that directory name," but a good example of that would be, i think, straight out of oe-core, showing that:

Quoted 4 lines

BBMASK += ".../recipes-support/libcap"

would unfortunately also BBMASK libcap-ng (hence the caution to use a trailing slash to lock it to the directory name).

This is standard behavior for regular expressions. If you want to match the end of the path, you should use, e.g., BBMASK += ".../foo_1.2.3.bb$"

Quoted 5 lines

so as long as i've understood all this, that explanation in the BB
manual seems like it could use a couple more examples. or have i misread?

rday

//Peter

#2 lore raw
Quoted 15 lines · Peter Kjellerstedt
Quoted 7 lines

-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Robert P. J. Day
Sent: den 17 november 2020 17:44
To: YP docs mailing list <[email protected]>
Subject: [docs] clarifying the variations of BBMASK

Quoted 7 lines

as i've rarely needed to BBMASK stuff, i learned a couple things
today when a colleague brought me some masking that could use some highlighting in the docs, methinks.

first, all of his BBMASKing was of the form:

BBMASK += "|layer stuff ..."

Quoted 11 lines

Using += with "|...." doesn't really make sense. Originally, BBMASK only supported a single regular expression, and you would then typically have to either use BBMASK .= "|..." or BBMASK_append = "|..." This was troublesome as you had to basically know if something had already added something to BBMASK to know whether you should use BBMASK = "..." or BBMASK .= "|...". So I changed that a couple of years ago so that it now supports multiple regular expressions. At the same time I rewrote the documentation to only use examples that use BBMASK += "..." as there is absolutely no reason to promote the old way of adding more regular expressions to BBMASK.

ah, that explains it as i am working with a fairly old OE/YP code
base and migrating it to zeus, so i can safely simplify all that stuff.

rday