From: Benoît Mauduit Date: Thu, 12 Jan 2023 13:23:57 +0000 (+0100) Subject: lib/oe/reproducible: Use git log without gpg signature X-Git-Tag: 2020-04.23-dunfell~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e872f6636f4cb51426edc6c985e58d2fb74e0f96;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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. Signed-off-by: Benoît Mauduit Signed-off-by: Alexandre Belloni (cherry picked from commit 3bd6f78f79b3d3e87d8db1e11f58d8021f929843) Signed-off-by: Steve Sakoman --- diff --git a/meta/lib/oe/reproducible.py b/meta/lib/oe/reproducible.py index 0938e4cb394..1ed79b18ca2 100644 --- a/meta/lib/oe/reproducible.py +++ b/meta/lib/oe/reproducible.py @@ -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):