Skip to contentSkip to conversation

is a wildcarded bbappend file name valid without a "_"?

DISCUSSION Robert P. J. Day 3 participants 3 messages Jan 7

lore
Share & tools
lore
#0 lore raw

wasn't sure where to ask this but since i read it in the bitbake
manual, i figured, let's ask docs.

regarding using wildcarding in bbappend file names, the bitbake
manual insists:

"In the most general case, you could name the append file something as simple as busybox_%.bbappend to be entirely version independent."

ok, fair enough, that appears to imply that even in the most general
form of wildcarding, you would have the underscore just before the "%" wildcard character.

but i've seen a number of examples where even the underscore is
omitted, such as in this search under the meta-security layer, where the final line shows that the underscore is missing from the filename:

$ find . -name "linux-yocto*bbappend"
./recipes-kernel/linux/linux-yocto-rt_%.bbappend
./recipes-kernel/linux/linux-yocto_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto-rt_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto_%.bbappend
./meta-integrity/recipes-kernel/linux/linux-yocto%.bbappend
$

so this is clearly legal. should it be mentioned as being legal? or
discouraged? the bitbake manual certainly doesn't explain that this is a valid form of wildcarding. should it?

rday

#1 lore raw

Hi Robert,

Quoted 26 lines · Robert P. J. Day via lists.yoctoproject.org

wasn't sure where to ask this but since i read it in the bitbake
manual, i figured, let's ask docs.

regarding using wildcarding in bbappend file names, the bitbake
manual insists:

"In the most general case, you could name the append file something as simple as busybox_%.bbappend to be entirely version independent."

ok, fair enough, that appears to imply that even in the most general
form of wildcarding, you would have the underscore just before the "%" wildcard character.

but i've seen a number of examples where even the underscore is
omitted, such as in this search under the meta-security layer, where the final line shows that the underscore is missing from the filename:

$ find . -name "linux-yocto*bbappend"
./recipes-kernel/linux/linux-yocto-rt_%.bbappend
./recipes-kernel/linux/linux-yocto_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto-rt_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto_%.bbappend
./meta-integrity/recipes-kernel/linux/linux-yocto%.bbappend
$
Quoted 1 line

so this is clearly legal. should it be mentioned as being legal? or

It's been used for a while (had this in meta-rockchip for years for u-boot, but that was not what we were supposed to do), so I would be for documenting it.

I would add a note about really thinking twice before doing this because it can match more than one thinks and impact third party layers which asked for nothing. E.g. the u-boot%.bbappend we used to have in meta-rockchip used to modify my u-boot-cherry-es recipe if I remember correctly, which is typically not something you want to do. In the example above, linux-yocto% is probably safe enough as I am not sure people would name their own kernel recipe linux-yocto-something. But linux% would be a no-no in my book.

Cheers,
Quentin

#2 lore raw
Quoted 35 lines · Quentin Schulz via lists.yoctoproject.org

Hi Robert,

Quoted 26 lines · Robert P. J. Day via lists.yoctoproject.org

   wasn't sure where to ask this but since i read it in the bitbake manual, i figured, let's ask docs.

   regarding using wildcarding in bbappend file names, the bitbake manual insists:

"In the most general case, you could name the append file something as simple as busybox_%.bbappend to be entirely version independent."

   ok, fair enough, that appears to imply that even in the most general form of wildcarding, you would have the underscore just before the "%" wildcard character.

   but i've seen a number of examples where even the underscore is omitted, such as in this search under the meta-security layer, where the final line shows that the underscore is missing from the filename:

$ find . -name "linux-yocto*bbappend"
./recipes-kernel/linux/linux-yocto-rt_%.bbappend
./recipes-kernel/linux/linux-yocto_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto-rt_%.bbappend
./meta-tpm/recipes-kernel/linux/linux-yocto_%.bbappend
./meta-integrity/recipes-kernel/linux/linux-yocto%.bbappend
$
Quoted 1 line

   so this is clearly legal. should it be mentioned as being legal? or

It's been used for a while (had this in meta-rockchip for years for u-boot, but that was not what we were supposed to do), so I would be for documenting it.

Quoted 8 lines

I would add a note about really thinking twice before doing this because it can match more than one thinks and impact third party layers which asked for nothing. E.g. the u-boot%.bbappend we used to have in meta-rockchip used to modify my u-boot-cherry-es recipe if I remember correctly, which is typically not something you want to do. In the example above, linux-yocto% is probably safe enough as I am not sure people would name their own kernel recipe linux-yocto-something. But linux% would be a no-no in my book.

Right, the _ is highly recommended as an anchor but you don't have to do that. So it isn't "the most general case" as that could be "a%.bbappend" or something but we don't really want to encourage it.

Cheers,

Richard