We have many internal projects that we build as part of our platform. These are 
all managed in git repositories. Our recipes therefore all point at git 
repositories.
After some internal discussions we have come to  the conclusion that having 
traditional version numbers of the form x.y.z is not very useful to anyone and 
is a chore to maintain.
We would like to generate our version numbers in the format 
YYYY.MM.DD-PR-SRCREV - e.g. 2024.10.25-1-abcdef12.
I found the SRCDATE variable in the glossary documented as "The date of the 
source code used to build the package. This variable applies only if the source 
was fetched from a Source Code Manager (SCM)." and initially thought great, and 
went ahead and set:

PV = "${SRCDATE}-${SRCPV}"

However what I find is that builds have the current date - i.e. the build date, 
not the date of the currently used commit to the source tree. Indeed SRCDATE it 
literally derived from DATE, the date when we run. This has a several problems:

1) Everything would be rebuilt every day as a new date changes the recipe
2) The builds are not reproducible
3) We want to be able to see at a glance the date a given packages source was 
committed, not when it happened to get built.

Does anybody know of a way to achieve this? I have tried looking through the 
docs and the output of bitbake <recipename> -e and come up empty.

If we were to implement a way to get this information in bitbake what are the 
chances of being able to get it merged upstream? would this be frowned upon or 
rejected on any grounds?
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64129): https://lists.yoctoproject.org/g/yocto/message/64129
Mute This Topic: https://lists.yoctoproject.org/mt/109209288/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to