]> code.ossystems Code Review - openembedded-core.git/commit
u-boot-tools: Fix reproducibility issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 20 Dec 2020 12:15:06 +0000 (12:15 +0000)
committerAnuj Mittal <anuj.mittal@intel.com>
Mon, 28 Dec 2020 01:53:26 +0000 (09:53 +0800)
commitbd6495ba968f359c53e75a61e373124acf33ead5
tree23f55513af7c5dde8f6308358baa8ab1e712bc2b
parentd10ea68968bd76c9f436291c68ebf39db62ce3a8
u-boot-tools: Fix reproducibility issue

If you build on a system with git < 2.14 from scratch (e.g. debian9), the
tree will be marked as "dirty" and the version will include "-dirty", leading
to a reproducibility problem. The issue is the inode count for Licnses/README
changing due to do_populate_lic hardlinking a copy of the file. We avoid
this by ensuring the index is updated with a "git diff" before the
u-boot machinery tries to determine the version.

build$ ../git/scripts/setlocalversion ../git
""
build$ ln ../git/
build$ ln ../git/README ../foo
build$ ../git/scripts/setlocalversion ../git
""-dirty

(i.e. creating a hardlink dirties the index)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a4de915af9e2c4d365527ad09286483b2ee904fc)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
meta/recipes-bsp/u-boot/u-boot-tools.inc