Salome HOME
check system products dependencies before compiling + check openssl when piping
[tools/sat.git] / src / product.py
index d38241a3f8f19cc83eef8e6a89b9fdc0f6923d22..59940956e881e671ad34ab66aad044e782993bf0 100644 (file)
@@ -829,10 +829,29 @@ def check_installation(config, product_info):
     :return: True if it is well installed
     :rtype: boolean
     """
-    # don't check native products, or products that are not compiled
-    if (not product_compiles(product_info)) or product_is_native(product_info):
+    # don't check products that are not compiled
+    if not product_compiles(product_info):
         return True
 
+    if product_is_native(product_info):
+        # check a system product
+        check_cmd=src.system.get_pkg_check_cmd()
+        run_pkg,build_pkg=src.product.check_system_dep(check_cmd, product_info)
+        build_dep_ko=[]
+        for pkg in build_pkg:
+            if "KO" in build_pkg[pkg]:
+               build_dep_ko.append(pkg) 
+        if build_dep_ko:
+              # the product is not installed : display message and return error status
+              msg="Please install them with %s before compiling salome" % check_cmd[0]
+              print("\nmissing compile time dependencies : ")
+              for md in build_dep_ko: 
+                  print(md)
+              print(msg)
+              return False
+        else:
+            return True    
+
     install_dir = product_info.install_dir
     if ( (src.appli_test_property(config,"single_install_dir", "yes") and 
           src.product.product_test_property(product_info,"single_install_dir", "yes")) or