Verbose and helpful messages for waf configure if mkisofs or mysql.exe are not found

This commit is contained in:
Manuel Amador (Rudd-O) 2010-09-01 17:18:38 -07:00
parent 398b084572
commit 49f2616fd9
2 changed files with 8 additions and 3 deletions

View File

@ -758,7 +758,7 @@ def deploydb(ctx,virttech=None):
before = before + file(p).read()
Utils.pprint("GREEN","Reading database code from %s"%p)
cmd = ["mysql","--user=%s"%dbuser,"-h",dbhost,"--password=%s"%dbpw]
cmd = [ctx.env.MYSQL,"--user=%s"%dbuser,"-h",dbhost,"--password=%s"%dbpw]
Utils.pprint("GREEN","Deploying database scripts to %s (user %s)"%(dbhost,dbuser))
Utils.pprint("BLUE"," ".join(cmd))
p = _Popen(cmd,stdin=PIPE,stdout=None,stderr=None)
@ -783,7 +783,7 @@ def deploydb(ctx,virttech=None):
after = after + file(p).read()
Utils.pprint("GREEN","Reading database code from %s"%p)
cmd = ["mysql","--user=%s"%dbuser,"-h",dbhost,"--password=%s"%dbpw]
cmd = [ctx.env.MYSQL,"--user=%s"%dbuser,"-h",dbhost,"--password=%s"%dbpw]
Utils.pprint("GREEN","Deploying post-configuration database scripts to %s (user %s)"%(dbhost,dbuser))
Utils.pprint("BLUE"," ".join(cmd))
p = _Popen(cmd,stdin=PIPE,stdout=None,stderr=None)

View File

@ -112,7 +112,12 @@ conf.check_message_2("%s"%conf.env.PREFIX,"GREEN")
conf.check_tool('misc')
conf.check_tool("gnu_dirs")
conf.check_tool('tar')
conf.check_tool('mkisofs')
try: conf.check_tool('mkisofs')
except Configure.ConfigurationError,e:
raise Configure.ConfigurationError, "The program genisoimage (or mkisofs) could not be found.\nOn Linux: ./waf installrpmdeps or ./waf installdebdeps according to your distro's package format.\nOn Windows: Use cygwin to install the mkisofs package, then ensure that the program is in your PATH."
try: conf.find_program('mysql',mandatory=True)
except Configure.ConfigurationError,e:
raise Configure.ConfigurationError, "The program mysql (or mysql.exe) could not be found.\nOn Linux: ./waf installrpmdeps or ./waf installdebdeps according to your distro's package format.\nOn Windows: Install the MySQL client package and ensure that the mysql.exe program is in your PATH."
conf.check_tool('java')
conf.check_tool("python")
conf.check_python_version((2,4,0))