]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
base/reproducible: Change Source Date Epoch generation methods
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Jul 2022 09:39:26 +0000 (10:39 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Jul 2022 12:55:13 +0000 (13:55 +0100)
In bc, we found that there are files newer than Changelog (e.g. scan.l)
which means after install runs, the timestamp is clamped to SDE which means
"bitbake bc -C compile" would then try and regenerate generated files and
complain flex was missing.

Rather than assuming Changelog/NEWS are magic for dates, drop that scan
method and scan all unpacked files. This shouldn't be that slow as they'd
be in the disk cache already after an unpack.

For bc, this changes SDE by about two minutes and avoids the problems
rebuilding.

Add a version comment to the task definition as changes in python library
code won't trigger a rebuild and we need one here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/lib/oe/reproducible.py

index cc02de5f77ed7b6fa5e40c39c58625421091c4c3..571b6754f22185bc103bccc1859fcc6010e2a9d6 100644 (file)
@@ -209,6 +209,7 @@ addtask do_deploy_source_date_epoch_setscene
 addtask do_deploy_source_date_epoch before do_configure after do_patch
 
 python create_source_date_epoch_stamp() {
+    # Version: 1
     source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S'))
     oe.reproducible.epochfile_write(source_date_epoch, d.getVar('SDE_FILE'), d)
 }
index 35b8be6d0844577d2f6f97be6f276abea91a4b57..2e815df19071e8e73b3e5f96b9a0cda8d4d86ef0 100644 (file)
@@ -152,7 +152,6 @@ def fixed_source_date_epoch(d):
 def get_source_date_epoch(d, sourcedir):
     return (
         get_source_date_epoch_from_git(d, sourcedir) or
-        get_source_date_epoch_from_known_files(d, sourcedir) or
         get_source_date_epoch_from_youngest_file(d, sourcedir) or
         fixed_source_date_epoch(d)       # Last resort
     )