summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Mauduit <bmauduit@beneth.fr>2023-01-12 14:23:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-26 23:39:06 +0000
commit1f240d44b368a861238313cccfd33152db9e69d2 (patch)
tree030530247fa503ef89e50652df6a7abc3d3f574b
parentfb1c4f78d2a5346deeb70050057b6a88927ad680 (diff)
downloadpoky-1f240d44b368a861238313cccfd33152db9e69d2.tar.gz
lib/oe/reproducible: Use git log without gpg signature
Previously, if "showSignature" is present in user gitconfig, parsing of the timestamp will fail. Ideally we should replace this command with a git plumbing command. (From OE-Core rev: 1075cdeae6af392acddb8c975ac4facc91a5ccde) Signed-off-by: Benoît Mauduit <bmauduit@beneth.fr> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 3bd6f78f79b3d3e87d8db1e11f58d8021f929843) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/reproducible.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py
index 04a1810d4f..9ac75c02e3 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -115,7 +115,8 @@ def get_source_date_epoch_from_git(d, sourcedir):
115 return None 115 return None
116 116
117 bb.debug(1, "git repository: %s" % gitpath) 117 bb.debug(1, "git repository: %s" % gitpath)
118 p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE) 118 p = subprocess.run(['git', '-c', 'log.showSignature=false', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'],
119 check=True, stdout=subprocess.PIPE)
119 return int(p.stdout.decode('utf-8')) 120 return int(p.stdout.decode('utf-8'))
120 121
121def get_source_date_epoch_from_youngest_file(d, sourcedir): 122def get_source_date_epoch_from_youngest_file(d, sourcedir):