In message: [meta-virtualization][PATCH 1/5] busybox-initrd: auto pv from 
busybox
on 15/05/2023 Adrian Freihofer wrote:

> Not hardcoding the version of busybox from the core layer in this layer
> is a small improvement for maintenance.
> 
> But the main motivation is to support the following layer combination
> without getting a parse error from bitbake:
> - poky LTS, branch = kirkstone
> - meta-lts-mixins, branch = kirkstone/go
> - meta-lts-mixins, branch = kirkstone/rust
> - meta-virtualization, branch = master

While there's no "official" support for combinations like that, the
patch passed my local testing, so I see no reason to break combinations
like you've listed at the parse step.

The old parse issue was sort of "on purpose" as it was a signal that
busybox had changed, and the rename triggered a re-validation of the
functionality. With the automatic PV update, that won't happen, so there
is a chance of runtime issues creeping it.

If runtime issues do start appearing, I can always enahance this to
take a list of supported / tested busybox versions and have the function
check against those known versions before continuing.

This is now merged to master.

I'm doing more runtime and framework testing on other package updates
now.

Bruce

> 
> Signed-off-by: Adrian Freihofer <[email protected]>
> ---
>  ...{busybox-initrd_1.36.0.bb => busybox-initrd.bb} | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>  rename recipes-core/busybox/{busybox-initrd_1.36.0.bb => busybox-initrd.bb} 
> (59%)
> 
> diff --git a/recipes-core/busybox/busybox-initrd_1.36.0.bb 
> b/recipes-core/busybox/busybox-initrd.bb
> similarity index 59%
> rename from recipes-core/busybox/busybox-initrd_1.36.0.bb
> rename to recipes-core/busybox/busybox-initrd.bb
> index 6108e9a..513ed13 100644
> --- a/recipes-core/busybox/busybox-initrd_1.36.0.bb
> +++ b/recipes-core/busybox/busybox-initrd.bb
> @@ -1,5 +1,19 @@
>  FILESEXTRAPATHS:prepend := 
> "${THISDIR}/busybox-initrd:${COREBASE}/meta/recipes-core/busybox/busybox:${COREBASE}/meta/recipes-core/busybox/files:"
>  
> +def get_busybox_pv(d):
> +    import re
> +    corebase = d.getVar('COREBASE')
> +    bb_dir = os.path.join(corebase, 'meta', 'recipes-core', 'busybox')
> +    if os.path.isdir(bb_dir):
> +        re_bb_name = re.compile(r"busybox_([0-9.]*)\.bb")
> +        for bb_file in os.listdir(bb_dir):
> +            result = re_bb_name.match(bb_file)
> +            if result:
> +                return result.group(1)
> +    bb.fatal("Cannot find busybox recipe in %s" % bb_dir)
> +
> +PV := "${@get_busybox_pv(d)}"
> +
>  require recipes-core/busybox/busybox_${PV}.bb
>  
>  SRC_URI += "file://init.cfg \
> -- 
> 2.40.1
> 

> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8062): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8062
Mute This Topic: https://lists.yoctoproject.org/mt/98905946/21656
Group Owner: [email protected]
Unsubscribe: 
https://lists.yoctoproject.org/g/meta-virtualization/leave/6693005/21656/1014668956/xyzzy
 [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to