[PATCH] lib/oe/patch: use author date as commit date for "git am"

3 views
Skip to first unread message

Cedric Hombourger

unread,
Dec 1, 2025, 11:32:40 PM (3 days ago) Dec 1
to openembe...@lists.openembedded.org, isar-...@googlegroups.com, Cedric Hombourger
By default, "git am" uses the time of commit creation as the committer
date and is therefore "unique" to each build.

Use the --committer-date-is-author-date option for git to use the author
date as the committer date to get deterministic meta-data and therefore
commit hashes (which may end-up in sources or build in the form of e.g.
localversion file).

Cc: isar-...@googlegroups.com
Signed-off-by: Cedric Hombourger <cedric.h...@siemens.com>
---
meta/lib/oe/patch.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 77b166cfa3..246fc6221f 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -626,7 +626,8 @@ class GitApplyTree(PatchTree):
try:
shellcmd = [patchfilevar, "git", "--work-tree=%s" % reporoot]
self.gitCommandUserOptions(shellcmd, self.commituser, self.commitemail)
- shellcmd += ["am", "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
+ shellcmd += ["am", "--committer-date-is-author-date",
+ "-3", "--keep-cr", "--no-scissors", "-p%s" % patch['strippath']]
return _applypatchhelper(shellcmd, patch, force, reverse, run)
except CmdError:
# Need to abort the git am, or we'll still be within it at the end
--
2.47.3

Cedric Hombourger

unread,
Dec 2, 2025, 4:16:09 AM (3 days ago) Dec 2
to openembe...@lists.openembedded.org, Cedric Hombourger, isar-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages