summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2012-06-07 14:22:33 +0300
committerAlexander Bokovoy <ab@samba.org>2012-06-07 17:03:01 +0200
commite1023501d92dea532736d86c6efecb8cde92327d (patch)
tree14d5be4c70f1169a0eb75296439ce3f3902d5798
parent23aac2039d921abdde1a2b6e2bdb4a3d0bcab8ee (diff)
downloadsamba-e1023501d92dea532736d86c6efecb8cde92327d.tar.gz
samba-e1023501d92dea532736d86c6efecb8cde92327d.tar.bz2
samba-e1023501d92dea532736d86c6efecb8cde92327d.zip
waf: fix parsing krb5-config --version for MIT krb5
krb5-config --version may return a string that ends with a suffix after version number (1.X-prerelease or 1.X-beta1, for example). Detect and ignore the suffix. Autobuild-User(master): Alexander Bokovoy <ab@samba.org> Autobuild-Date(master): Thu Jun 7 17:03:01 CEST 2012 on sn-devel-104
-rw-r--r--wscript_configure_system_mitkrb510
1 files changed, 8 insertions, 2 deletions
diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
index 1ad6d207db..31ed7f7af1 100644
--- a/wscript_configure_system_mitkrb5
+++ b/wscript_configure_system_mitkrb5
@@ -37,9 +37,15 @@ if conf.env.KRB5_CONFIG:
conf.define('USING_SYSTEM_KRB5', 1)
del conf.env.HEIMDAL_KRB5_CONFIG
kversion = conf.cmd_and_log("%(path)s --version" % dict(path=conf.env.KRB5_CONFIG), dict()).strip()
- kversion_split = map(int, kversion.split(" ")[-1].split("."))
- if kversion_split < [1, 9]:
+ kversion_split = kversion.split(' ')[-1].split('.')
+ # drop '-prerelease' suffix
+ if kversion_split[-1].find('-') > 0:
+ last_digit = kversion_split[-1].split('-')[0]
+ kversion_split[-1] = last_digit
+ kversion_check = map(int, kversion_split)
+ if kversion_check < [1, 9]:
Logs.error('ERROR: MIT krb5 build requires at least 1.9.0. %s is found and cannot be used' % (kversion))
+ Logs.error('ERROR: You may try to build with embedded Heimdal Kerebros by not specifying --with-system-mitkrb5')
sys.exit(1)
else:
Logs.info('%s is detected, MIT krb5 build can proceed' % (kversion))