]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
lib/oe/reproducible: Use git log without gpg signature
authorBenoît Mauduit <bmauduit@beneth.fr>
Thu, 12 Jan 2023 13:23:57 +0000 (14:23 +0100)
committerSteve Sakoman <steve@sakoman.com>
Sat, 4 Feb 2023 14:34:20 +0000 (04:34 -1000)
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.

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>
meta/lib/oe/reproducible.py

index 0938e4cb394469c256831b70ff19e5edda2f2f3d..1ed79b18ca250723fd278c7fb1312228dc8d8cd0 100644 (file)
@@ -62,7 +62,8 @@ def get_source_date_epoch_from_git(d, sourcedir):
         return None
 
     bb.debug(1, "git repository: %s" % gitpath)
-    p = subprocess.run(['git', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'], check=True, stdout=subprocess.PIPE)
+    p = subprocess.run(['git', '-c', 'log.showSignature=false', '--git-dir', gitpath, 'log', '-1', '--pretty=%ct'],
+                       check=True, stdout=subprocess.PIPE)
     return int(p.stdout.decode('utf-8'))
 
 def get_source_date_epoch_from_youngest_file(d, sourcedir):