Salome HOME
loggingSimple.py super for logging 0.5.0.5 python 2.6
[tools/sat.git] / src / product.py
index 6a9a8d4b1d187220418322736b87c09afbe948a8..23774e58d44d23a622a836642d7165efbb6e2d13 100644 (file)
@@ -54,6 +54,7 @@ def get_product_config(config, product_name, with_install_dir=True):
     # current product 
     debug = 'no'
     dev = 'no'
+    verbose = 'no'
     base = 'maybe'
     section = None
     if isinstance(version, src.pyconf.Mapping):
@@ -68,6 +69,10 @@ def get_product_config(config, product_name, with_install_dir=True):
         if 'debug' in dic_version:
             debug = dic_version.debug
         
+        # Get the verbose if any
+        if 'verbose' in dic_version:
+            verbose = dic_version.verbose
+        
         # Get the dev if any
         if 'dev' in dic_version:
             dev = dic_version.dev
@@ -164,6 +169,7 @@ Please add a section in it.""") % {"1" : vv, "2" : prod_pyconf_path}
     
     # Set the debug, dev and version keys
     prod_info.debug = debug
+    prod_info.verbose = verbose
     prod_info.dev = dev
     prod_info.version = version
     
@@ -198,7 +204,9 @@ Please add a section in it.""") % {"1" : vv, "2" : prod_pyconf_path}
                     DBG.tofix(msg, config.PATHS.ARCHIVEPATH) #avoid 2 messages in compile
                     prod_info.archive_info.archive_name = arch_name #without path
                     # raise src.SatException(msg) #may be a warning, continue #8646
-                prod_info.archive_info.archive_name = arch_path
+                else:
+                    prod_info.archive_info.archive_name = arch_path
+
         
     # If the product compiles with a script, check the script existence
     # and if it is executable
@@ -572,20 +580,6 @@ def check_source(product_info):
                 return False
     return True
 
-def product_is_sample(product_info):
-    """Know if a product has the sample type
-    
-    :param product_info Config: The configuration specific to 
-                               the product
-    :return: True if the product has the sample type, else False
-    :rtype: boolean
-    """
-    if 'type' in product_info:
-        ptype = product_info.type
-        return ptype.lower() == 'sample'
-    else:
-        return False
-
 def product_is_salome(product_info):
     """Know if a product is a SALOME module
     
@@ -645,6 +639,17 @@ def product_is_debug(product_info):
     debug = product_info.debug
     return debug.lower() == 'yes'
 
+def product_is_verbose(product_info):
+    """Know if a product is in verbose mode
+    
+    :param product_info Config: The configuration specific to 
+                               the product
+    :return: True if the product is in verbose mode, else False
+    :rtype: boolean
+    """
+    verbose = product_info.verbose
+    return verbose.lower() == 'yes'
+
 def product_is_autotools(product_info):
     """Know if a product is compiled using the autotools