summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
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-09-11 22:39:19 +0100
commit74d7d84dcb06aedd040ac77fcb577259419f2a2a (patch)
tree133f8aef01644c2a7b68f70e6ceacb8ba3e89d56 /meta/classes/externalsrc.bbclass
parent88e643a8b75f7cc7e30c5212f8e08cc483249aa7 (diff)
downloadpoky-74d7d84dcb06aedd040ac77fcb577259419f2a2a.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: 0b7dd711a54e92ce54abe99f59fc67e683d52dfe) 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>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-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 54b08adf62..7f1a760eec 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -110,6 +110,16 @@ python () {
110 continue 110 continue
111 bb.build.deltask(task, d) 111 bb.build.deltask(task, d)
112 112
113 if bb.data.inherits_class('reproducible_build', d) and 'do_unpack' in d.getVar("SRCTREECOVEREDTASKS").split():
114 # The reproducible_build's create_source_date_epoch_stamp function must
115 # be run after the source is available and before the
116 # do_deploy_source_date_epoch task. In the normal case, it's attached
117 # to do_unpack as a postfuncs, but since we removed do_unpack (above)
118 # we need to move the function elsewhere. The easiest thing to do is
119 # move it into the prefuncs of the do_deploy_source_date_epoch task.
120 # This is safe, as externalsrc runs with the source already unpacked.
121 d.prependVarFlag('do_deploy_source_date_epoch', 'prefuncs', 'create_source_date_epoch_stamp ')
122
113 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ") 123 d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
114 d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ") 124 d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
115 125