Salome HOME
continue
authorSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 14 Mar 2016 08:15:40 +0000 (09:15 +0100)
committerSerge Rehbinder <serge.rehbinder@cea.fr>
Mon, 14 Mar 2016 08:15:40 +0000 (09:15 +0100)
commands/prepare.py

index abb14cbe3a99e1b6e784a74f9756f82eac9bf10f..12e39e3aa31f51f82d4c8809ebac1363e199da08 100644 (file)
@@ -95,6 +95,8 @@ def run(args, runner, logger):
     # check that the command has been called with an application
     src.check_config_has_application( runner.cfg )
 
+    modules_infos = get_modules_list(options, runner.cfg, logger)
+
     # Construct the option to pass to the source command
     args_source = runner.cfg.VARS.application + ' '
     
@@ -116,6 +118,20 @@ def run(args, runner, logger):
     # Construct the option to pass to the patch command
     args_patch = args_source.replace(' --force', '')
     
+    if ("dev_modules" in runner.cfg.APPLICATION and 
+                                runner.cfg.APPLICATION.dev_modules is not []):
+        
+        dev_modules = runner.cfg.APPLICATION.dev_modules
+        ldev_modules = [m for m in modules_infos if m[0] in dev_modules]
+        
+        if len(ldev_modules) > 0:
+            msg = _("The patches are not applied on "
+                    "the module in development mode\n")
+            
+            logger.write()
+            
+            modules_infos = [m for m in modules_infos if m[0] not in ldev_modules]
+    
     # Call the source command that gets the source
     msg = src.printcolors.printcHeader(
                     _('\nApply the patches to the sources of the modules\n'))