Hello, we use a script to generate updates for our products; it is contained inside a git repo (let's call it "gen-update") with a cmake file describing each sub-projects tags for the tagged update (example [1]). We also generate a new rootfs to have up-to-date machines during their manufacture.
I tried a few things and discovered that a recipe cannot export variables, and adding the "gen-update" repo inside each sub-projects SRC_URI was not working because their PV need to be defined first. I managed to get a half-working solution: - create a "gen-update.bb" [2], its only aim it to download the tagged "update.cmake" [1] - create a "gen-update-parser.bbclass" [3] to export the variables Each sub-projects use them inside with "SRC_URI" and "inherit". It has a lot of issues: 1/ the biggest one, everytime I change the "gen-update.bb" PV [2] and generate a new image, every sub-projects fail with a "metadata is not deterministic" [4] If I add a whitespace or simply run "touch" on the bb files bitbake works again. 2/ the hard-coded file path inside "gen-update-parser.bbclass" [3] By the way I'm surprised it's in the "work/cortexa53-crypto-fslc-linux" folder, not inside "work/all-fslc-linux" 3/ sometimes the "gen-update.bb" [2] is not unpacked and the parser fails What would be the correct way to do that? Thanks. #################### [1] update.cmake: set(PROJECT_FOO "1.2") set(PROJECT_BAR "2.6") ... #################### [2] gen-update.bb: SRC_URI = "git://git@our_server /gen-update.git;protocol=ssh;nobranch=1;tag=${PV}" PV = "update-2.0" #################### [3] gen-update-parser.bbclass: python () { import re import glob with open(glob.glob(d.expand('${BASE_WORKDIR}/cortexa53-crypto-fslc-linux/gen-update/*/git/update.cmake'))[0], 'r') as f: for line in f: vars = re.split("\(|\)|\s+", line) d.setVar(vars[1], vars[3].strip('\"')) } #################### [4] checksum mismatch error example: ERROR: When reparsing project_foo.bb:do_patch, the basehash value changed from 14abf321 to 4af89bb2. The metadata is not deterministic and this needs to be fixed. For each subprojects, multiple similar error messages for project_foo.bb: do_patch/do_fetch/do_unpack/do_configure/do_compile/do_install...
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#64032): https://lists.yoctoproject.org/g/yocto/message/64032 Mute This Topic: https://lists.yoctoproject.org/mt/109050399/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-