Salome HOME
get_archives_vcs big files not in /tmp but in APPLICATION.workdir + /tmp_package
authorChristian Van Wambeke <christian.van-wambeke@cea.fr>
Fri, 23 Mar 2018 14:54:18 +0000 (15:54 +0100)
committerChristian Van Wambeke <christian.van-wambeke@cea.fr>
Fri, 23 Mar 2018 14:54:18 +0000 (15:54 +0100)
commands/package.py
commands/prepare.py

index 1a16253d2bebb71b5e8cd0620be1c31081bcacf2..5a2c493b31b15ad668505a840b83d08a46042e1d 100644 (file)
@@ -753,7 +753,7 @@ def get_archives_vcs(l_pinfo_vcs, sat, config, logger, tmp_working_dir):
     # clean the source directory of all the vcs products, then use the source 
     # command and thus construct an archive that will not contain the patches
     l_prod_names = [pn for pn, __ in l_pinfo_vcs]
-    if False: # clean is dangerous in user/SOURCES, fixed in tmp_working_dir
+    if False: # clean is dangerous in user/SOURCES, fixed in tmp_local_working_dir
       logger.write(_("\nclean sources\n"))
       args_clean = config.VARS.application
       args_clean += " --sources --products "
@@ -767,7 +767,8 @@ def get_archives_vcs(l_pinfo_vcs, sat, config, logger, tmp_working_dir):
       args_source += " --products "
       args_source += ",".join(l_prod_names)
       svgDir = sat.cfg.APPLICATION.workdir
-      sat.cfg.APPLICATION.workdir = tmp_working_dir
+      tmp_local_working_dir = os.path.join(sat.cfg.APPLICATION.workdir, "tmp_package")  # to avoid too much big files in /tmp
+      sat.cfg.APPLICATION.workdir = tmp_local_working_dir
       # DBG.write("SSS sat config.APPLICATION.workdir", sat.cfg.APPLICATION, True)
       # DBG.write("sat config id", id(sat.cfg), True)
       # shit as config is not same id() as for sat.source()
@@ -778,7 +779,7 @@ def get_archives_vcs(l_pinfo_vcs, sat, config, logger, tmp_working_dir):
       # make the new archives
       d_archives_vcs = {}
       for pn, pinfo in l_pinfo_vcs:
-          path_archive = make_archive(pn, pinfo, tmp_working_dir)
+          path_archive = make_archive(pn, pinfo, tmp_local_working_dir)
           logger.write("make archive vcs '%s'\n" % path_archive)
           d_archives_vcs[pn] = (path_archive,
                                 os.path.join(ARCHIVE_DIR, pn + ".tgz"))
index ddd0de3d82536243644ae9b5f40941eb236b44e8..fc40f6458f66a3f01102b4454d8c660212a029cc 100644 (file)
@@ -76,7 +76,7 @@ def remove_products(arguments, l_products_info, logger):
     args = str(arguments) #copy of "--products ,XDATA,TESSCODE,cmake" for example
     largs = args.split(',')
     DBG.write("largs", largs)
-    toRemove = [name for name,_ in l_products_info]
+    toRemove = [name for name, xx in l_products_info]
     DBG.write("remove_products", toRemove)
     removed = []
     notRemoved = []