[Notes] [Git][BuildStream/buildstream][master] 2 commits: element.py: Put the temporary staging directory in artifactdir



Title: GitLab

Jim MacArthur pushed to branch master at BuildStream / buildstream

Commits:

1 changed file:

Changes:

  • buildstream/element.py
    ... ... @@ -1379,10 +1379,10 @@ class Element(Plugin):
    1379 1379
                 if not vdirectory.is_empty():
    
    1380 1380
                     raise ElementError("Staging directory '{}' is not empty".format(vdirectory))
    
    1381 1381
     
    
    1382
    -            # While mkdtemp is advertised as using the TMP environment variable, it
    
    1383
    -            # doesn't, so this explicit extraction is necesasry.
    
    1384
    -            tmp_prefix = os.environ.get("TMP", None)
    
    1385
    -            temp_staging_directory = tempfile.mkdtemp(prefix=tmp_prefix)
    
    1382
    +            # It's advantageous to have this temporary directory on
    
    1383
    +            # the same filing system as the rest of our cache.
    
    1384
    +            temp_staging_location = os.path.join(self._get_context().artifactdir, "staging_temp")
    
    1385
    +            temp_staging_directory = tempfile.mkdtemp(prefix=temp_staging_location)
    
    1386 1386
     
    
    1387 1387
                 try:
    
    1388 1388
                     workspace = self._get_workspace()
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]