From 3115aa157de4df5a2e32bd54c8552d8b7a757925 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Thu, 30 Sep 2021 15:41:59 -0500 Subject: python3: Fix sysroot reproducibility Fixes the reformatting of the sysconfigdata to be reproducible in the sysroot as well as in the package. During this a bug was uncovered in the way that the data was reformatted where it appears that python cannot parse a single line of code over 40000 characters. To work around this, pass a maximum with of "1" to pprint instead of sys.maxsize which will cause it to wrap as often as possible and should keep it reproducible. (From OE-Core rev: 2def2c145c303f27d93ba73876d4c6b214f18166) Signed-off-by: Joshua Watt Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3/reformat_sysconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta/recipes-devtools/python/python3') diff --git a/meta/recipes-devtools/python/python3/reformat_sysconfig.py b/meta/recipes-devtools/python/python3/reformat_sysconfig.py index c4164313e8..5e2b12879d 100644 --- a/meta/recipes-devtools/python/python3/reformat_sysconfig.py +++ b/meta/recipes-devtools/python/python3/reformat_sysconfig.py @@ -16,6 +16,6 @@ with open(sys.argv[1], 'r') as f: with open(sys.argv[1], 'w') as f: for k in sorted(l.keys()): f.write('%s = ' % k) - pprint.pprint(l[k], stream=f, width=sys.maxsize) + pprint.pprint(l[k], stream=f, width=1) f.write('\n') -- cgit v1.2.3-54-g00ecf