summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@xilinx.com>2021-09-09 21:22:13 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-23 23:14:17 +0100
commitf34727509abf938a7d337f335e08b33ed99d9daf (patch)
treece3071c26df4c2399be1e63a6674c33b63026537 /meta
parent7b13a316320247c43484c27a1b9a66ae28d36ee5 (diff)
downloadpoky-f34727509abf938a7d337f335e08b33ed99d9daf.tar.gz
externalsrc: Work with reproducible_build
Externalsrc removes do_fetch, do_unpack, and do_patch. The system normally discovers the correct reproducible date as a postfuncs of do_unpack, so this date is never found, so it falls back to the default epoch. Instead we can move the discovery function to a prefuncs on the epoch deploy task. This task will run before do_configure, and since the source is already available can run safely at anytime. (From OE-Core rev: badef50c6c9821f1975483de0ba50a75f2eda52c) Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0b7dd711a54e92ce54abe99f59fc67e683d52dfe) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/externalsrc.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index c7fcdca6ef..e94a5cc2af 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -109,6 +109,16 @@ python () {
109 continue 109 continue
110 bb.build.deltask(task, d) 110 bb.build.deltask(task, d)
111 111
112 if bb.data.inherits_class('reproducible_build', d) and 'do_unpack' in d.getVar("SRCTREECOVEREDTASKS").split():
113 # The reproducible_build's create_source_date_epoch_stamp function must
114 # be run after the source is available and before the
115 # do_deploy_source_date_epoch task. In the normal case, it's attached
116 # to do_unpack as a postfuncs, but since we removed do_unpack (above)
117 # we need to move the function elsewhere. The easiest thing to do is
118 # move it into the prefuncs of the do_deploy_source_date_epoch task.
119 # This is safe, as externalsrc runs with the source already unpacked.
120 d.prependVarFlag('do_deploy_source_date_epoch', 'prefuncs', 'create_source_date_epoch_stamp ')
121
112 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ") 122 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
113 d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ") 123 d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
114 124