1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-27 07:27:12 +00:00

reproducible: Merge code into base.bbclass

Reproducibility is here to stay and needs to be part of our default workflow.
Move the remaining code to base.bbclass so it is always a first class citizen
and it is clear people need to be mindful of it.

(From OE-Core rev: abb0671d2cebfd7e8df94796404bbe9c7f961058)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2021-10-14 12:34:17 +01:00
parent f47a396964
commit 4b424bdfdb
9 changed files with 95 additions and 106 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}-${MACHINE}"
IMAGE_NAME_SUFFIX ??= ".rootfs"
python () {
if bb.data.inherits_class('reproducible_build', d) and bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}":
if bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}":
import datetime
d.setVar("IMAGE_VERSION_SUFFIX", "-" + datetime.datetime.fromtimestamp(int(d.getVar("SOURCE_DATE_EPOCH")), datetime.timezone.utc).strftime('%Y%m%d%H%M%S'))
d.setVarFlag("IMAGE_VERSION_SUFFIX", "vardepvalue", "")