From b6efa1507c38d316e8cf05025b47a555ca0d0d0a Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 19 Sep 2018 18:31:34 +1000 Subject: [PATCH] heimdal-build: Avoid using python str.format() In python 2.6, the format fields need to be numbered explicitly. This causes the build to fail on RHEL6/Centos6 with following error: File "/home/amitay/samba.git/source4/heimdal_build/wscript_build", line 87, in HEIMDAL_ASN1 os.path.join(bld.path.abspath(), option_file))) ValueError: zero length field name in format To use str.format() in HEIMDAL_ASN1(), "--option-file='{}'" needs to be "--options-file='{0}'" Or this fix which avoids str.format() completely. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Fri Sep 21 03:06:44 CEST 2018 on sn-devel-144 --- source4/heimdal_build/wscript_build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source4/heimdal_build/wscript_build b/source4/heimdal_build/wscript_build index a0572e4ed51..45938b88315 100644 --- a/source4/heimdal_build/wscript_build +++ b/source4/heimdal_build/wscript_build @@ -82,9 +82,8 @@ def HEIMDAL_ASN1(name, source, t.env.ASN1OPTIONS = options t.env.BLDBIN = os.path.normpath(os.path.join(bld.srcnode.abspath(bld.env), '..')) if option_file is not None: - t.env.OPTION_FILE = "--option-file='{}'".format( - os.path.normpath( - os.path.join(bld.path.abspath(), option_file))) + t.env.OPTION_FILE = "--option-file='%s'" % \ + os.path.normpath(os.path.join(bld.path.abspath(), option_file)) cfile = out_files[0][0:-2] + '.c' hfile = out_files[1][0:-3] + '.h' -- 2.11.4.GIT