cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [13/51] [abbrv] git commit: Revert "waf: Fix how waf gets build id"
Date Fri, 14 Sep 2012 21:16:45 GMT
Revert "waf: Fix how waf gets build id"

Waf needs these while building RPMs. Reverting.

This reverts commit c5a25a2b338c03ef6b632ea6f2be4c095eee8d28,
e2ccf37b2a5fe0e34275ae945bc1bfd6817cf13b.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/b968cb85
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/b968cb85
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/b968cb85

Branch: refs/heads/4.0
Commit: b968cb855b29a1cbe5b0e3efcc5a8a9d7a4129eb
Parents: e2ccf37
Author: Prasanna Santhanam <tsp@apache.org>
Authored: Fri Sep 14 20:07:28 2012 +0530
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Fri Sep 14 20:16:53 2012 +0530

----------------------------------------------------------------------
 wscript           |    8 ++++----
 wscript_configure |   13 +++++++++++++
 2 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b968cb85/wscript
----------------------------------------------------------------------
diff --git a/wscript b/wscript
index 08b1cc6..f1c9b62 100644
--- a/wscript
+++ b/wscript
@@ -161,7 +161,7 @@ def svninfo(*args):
 
 def gitinfo(dir=None):
 	if dir and not _isdir(dir): return ''
-	try: p = _Popen(['git','rev-parse', '--short', 'HEAD'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir)
+	try: p = _Popen(['git','remote','show','-n','origin'],stdin=PIPE,stdout=PIPE,stderr=PIPE,cwd=dir)
 	except OSError,e:
 		if e.errno == 2: return '' # svn command is not installed
 		raise
@@ -194,7 +194,7 @@ def allgitinfo():
 	
 	return t + "\n\ncloustack-proprietary:\n" + u
 
-def _getbuildnumber():
+def _getbuildnumber(): # FIXME implement for git
 	n = Options.options.BUILDNUMBER
 	if n:
 		# luntbuild prepends "build-" to the build number.  we work around this here:
@@ -203,8 +203,8 @@ def _getbuildnumber():
 		if n.startswith("$Revision:"): n = n[11:-2].strip()
 		return n
 	else:
-		# Try to guess the Git revision number
-		stdout = gitinfo()
+		# Try to guess the SVN revision number by calling SVN info.
+		stdout = svninfo()
 		if not stdout: return ''
 		# Filter lines.
 		rev = [ x for x in stdout.splitlines() if x.startswith('SVN Revision') ]

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/b968cb85/wscript_configure
----------------------------------------------------------------------
diff --git a/wscript_configure b/wscript_configure
index 2caa27d..965847d 100644
--- a/wscript_configure
+++ b/wscript_configure
@@ -222,6 +222,19 @@ conf.check_tool('java')
 conf.check_tool("python")
 conf.check_python_version((2,4,0))
 
+conf.check_message_1('Detecting Python MySQL module')
+try: import MySQLdb
+except ImportError,e:
+	raise Configure.ConfigurationError, "The Python MySQLdb module could not be found.\nOn Linux:
./waf installrpmdeps or ./waf installdebdeps according to your distro's package format.\nOn
Windows: Install MySQL 5.1 on your machine, then install the Python MySQLdb module for Python
%s.\nThe module for Python 2.6 / win32 / MySQL 5.1 is available here: http://soemin.googlecode.com/files/MySQL-python-1.2.3c1.win32-py2.6.exe"%conf.env.PYTHON_VERSION
+conf.check_message_2('MySQLdb','GREEN')
+conf.check_message_1('Database info for developer setup')
+for a in "DBHOST DBUSER DBPW".split(): conf.env[a] = getattr(Options.options, a, '')
+conf.check_message_2("user: %r, password: %r, host: %r"%(conf.env.DBUSER,conf.env.DBPW,conf.env.DBHOST),'GREEN')
+
+try: conf.check_tool("tomcat")
+except Configure.ConfigurationError,e:
+	conf.fatal("Tomcat directory %r not found.  Either install Tomcat using ./waf installrpmdeps
or ./waf installdebdeps, or manually install Tomcat to a directory in your system and set
the environment variable TOMCAT_HOME to point to it."%conf.env.TOMCATHOME)
+
 conf.env.COMMONPATH = _join(conf.env.PACKAGE,"common")
 conf.env.AGENTPATH = _join(conf.env.PACKAGE,"agent")
 conf.env.CPPATH = _join(conf.env.PACKAGE,"console-proxy")


Mime
View raw message