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:37:05 +0000
commit93b4705b769b80a141d60f2036cea61abad3d36c (patch)
treeb2bada2f7cc628d7a99db71f72a7c46937588f88
parentca564b9513c4f6d927dd6a8d601ae86659e8da5b (diff)
downloadpoky-93b4705b769b80a141d60f2036cea61abad3d36c.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: 3db6db22770515fe52d847bdafd6ec9809ab50e0) 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 2e815df190..768fd4f19c 100644
--- a/meta/lib/oe/reproducible.py
+++ b/meta/lib/oe/reproducible.py
@@ -113,7 +113,8 @@ def get_source_date_epoch_from_git(d, sourcedir):
113 return None 113 return None
114 114
115 bb.debug(1, "git repository: %s" % gitpath) 115 bb.debug(1, "git repository: %s" % gitpath)
116 p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE) 116 p = subprocess.run(['git', '-c', 'log.showSignature=false', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'],
117 check=True, stdout=subprocess.PIPE)
117 return int(p.stdout.decode('utf-8')) 118 return int(p.stdout.decode('utf-8'))
118 119
119def get_source_date_epoch_from_youngest_file(d, sourcedir): 120def get_source_date_epoch_from_youngest_file(d, sourcedir):