hello,
I would like to have a custom DISTRO_VERSION based on "git describe" of my
layer:
1) In my layer meta-mylayer/conf/layer.conf, I defined the following:
# Set variable to get the location of the layer
> MY_LAYER_BASE := '${LAYERDIR}'
2) I created a my_distro_version.bbclass with following:
def my_distro_version(d):
> import subprocess
> project_path = d.getVar('MY_LAYER_BASE', True)
> cmd = "git describe --tags"
> proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True,
> cwd=project_path)
> out, err = proc.communicate()
> return out.decode("utf-8").rstrip()
3) Then I inherited it my meta-mylayer/conf/distro/my_distro.conf :
INHERIT += "my_distro_version"
> DISTRO_VERSION = "${@my_distro_version(d)}"
>
so far so good I can see that DISTRO_VERSION is following the git describe :
NOTE: Resolving any missing task queue dependencies
MACHINE = "beaglebone-yocto"
> DISTRO = "my-distro"
> DISTRO_VERSION = "v1.4-rc14"
> TUNE_FEATURES = "arm vfp cortexa8 neon callconvention-hard"
> TARGET_FPU = "hard"
> meta-mylayer = "HEAD:ca8a5390db5e5280c3b178097ad36900c97160a8"
> meta-swupdate = "HEAD:2e08de8582aa18871657ea8283ea35a050927d4f"
> meta-qt5 = "HEAD:6bfe29d9e8fdd5c2fd17c736814b6df859b3af50"
But I'm getting a lot of errors :
the basehash value changed from
efc66702573a04ced9af3be8902d643f8709969ad8cdf19b822e9bd14910c755 to
d24664027a632185bda9807951586efdf9b9160bb7cef2524d7c9d577cc6f527. The
metadata is not deterministic and this needs to be fixed.
> ERROR: The following commands may help:
> ERROR: $ bitbake my-image -cdo_image_wic -Snone
> ERROR: Then:
> ERROR: $ bitbake my-image -cdo_image_wic -Sprintdiff
and some of the recipes don't get the right DISTRO_VERSION.
probably a multi processing problem in yocto since I used
INHERIT += "my_distro_version" all recipes will want to execute
DISTRO_VERSION = "${@my_distro_version(d)}".
I didn't find a way to get DISTRO_VERSION =
"${@my_distro_version(d)}" executed only once!
Any suggestions ?
Thanks
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56930): https://lists.yoctoproject.org/g/yocto/message/56930
Mute This Topic: https://lists.yoctoproject.org/mt/90750240/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-