theDependencies = None,
theInstalldiskspace = None,
theTemporarydiskspace = None,
- theScript = None):
+ theScript = None,
+ thePickUpEnvironment = None):
self.name = theName
self.installdiskspace = theInstalldiskspace
self.temporarydiskspace = theTemporarydiskspace
self.script = theScript
+ self.pickupEnv = thePickUpEnvironment
#===================================================================
# class Config
attrs['temporarydiskspace'],
attrs['script'])
+ if attrs.has_key( 'pickupenv' ):
+ aProduct.pickupEnv = attrs['pickupenv']
+
self.products.append(aProduct)
def end_product(self):
#list_of_dep = get_dependencies_set(parser.products)
if check_disk_space(parser.products, scripts_dir, target_dir, tmp_dir) :
-
+
+ # install products
for product in parser.products :
if product.disable == "true": continue
res = os.system(cmd)
if res : break;
- shFile = target_dir + "/env_products.sh"
- cshFile = target_dir + "/env_products.csh"
- binProduct = parser.getProduct("KERNEL-Bin")
- srcProduct = parser.getProduct("KERNEL-Src")
- if binProduct:
- if os.path.exists(shFile):
- os.system( "cp " + shFile + " " + target_dir + "/KERNEL_" + binProduct.version + "/salome.sh" )
- if os.path.exists(cshFile):
- os.system( "cp " + cshFile + " " + target_dir + "/KERNEL_" + binProduct.version + "/salome.csh" )
- if srcProduct:
- if os.path.exists(shFile):
- os.system( "cp " + shFile + " " + target_dir + "/KERNEL_SRC_" + binProduct.version + "/salome.sh" )
- if os.path.exists(cshFile):
- os.system( "cp " + cshFile + " " + target_dir + "/KERNEL_SRC_" + binProduct.version + "/salome.csh" )
+ # pickup environment
+ for product in parser.products :
+
+ if product.disable == "true": continue
+
+ if product.pickupEnv == "true":
+ cmd = scripts_dir + product.script + " " + \
+ "pickup_env " + \
+ tmp_dir + " " + \
+ source_dir + "/" + subdir[product.install] + " " + \
+ target_dir + " " + \
+ '"' + list_of_dep + '"' + " " + \
+ product.name
+
+ res = os.system(cmd)
if len(root_path) and os.path.exists(root_path):
os.system("rm -r -f "+ root_path)