Correct problems in raptorinstallermaker.py: ensure missing directories' names are printed rather than %s when checking Win32 support directory, and remove final reliance on SBS_HOME environment variable (use only the value passed to the -s switch). wip
authorDaniel Jacobs <daniel.jacobs@nokia.com>
Wed, 20 Jan 2010 13:46:39 +0000
branchwip
changeset 143 a00bdef52597
parent 142 26f2f0b4002b
child 153 df63379a03bd
Correct problems in raptorinstallermaker.py: ensure missing directories' names are printed rather than %s when checking Win32 support directory, and remove final reliance on SBS_HOME environment variable (use only the value passed to the -s switch).
sbsv2/raptor/util/install-windows/raptorinstallermaker.py
--- a/sbsv2/raptor/util/install-windows/raptorinstallermaker.py	Wed Jan 20 13:31:03 2010 +0000
+++ b/sbsv2/raptor/util/install-windows/raptorinstallermaker.py	Wed Jan 20 13:46:39 2010 +0000
@@ -33,7 +33,7 @@
 parser.add_option("-s", "--sbs-home", dest="sbshome",
                   help="Path to use as SBS_HOME environment variable. If not present the script exits.")
 parser.add_option("-w", "--win32-support", dest="win32support",
-                  help="Path to use as SBS_HOME environment variable. If not present the script exits.")
+                  help="Path to Win32 support directory. If not present the script exits.")
 
 (options, args) = parser.parse_args()
 
@@ -49,7 +49,7 @@
 	win32supportdirs = ["bv", "cygwin", "mingw", "python264"]
 	for dir in win32supportdirs:
 		if not os.path.isdir(os.path.join(options.win32support, dir)):
-			print "ERROR: directory %s does not exist. Cannot build installer. Exiting..."
+			print "ERROR: directory %s does not exist. Cannot build installer. Exiting..." % dir
 			sys.exit(2)
 
 def parseconfig(xmlFile="raptorinstallermaker.xml"):
@@ -57,7 +57,7 @@
 
 def generateinstallerversionheader(sbshome = None):
 	shellenv = os.environ.copy()
-	shellenv["PYTHONPATH"] = os.path.join(os.environ["SBS_HOME"], "python")
+	shellenv["PYTHONPATH"] = os.path.join(sbshome, "python")
 	
 	raptorversioncommand = "python -c \"import raptor_version; print raptor_version.numericversion()\""