[Notes] [Git][BuildStream/buildstream][tiagogomes/issue-520] 4 commits: element.py (docs): dashes not underscores for build and install root



Title: GitLab

Tiago Gomes pushed to branch tiagogomes/issue-520 at BuildStream / buildstream

Commits:

3 changed files:

Changes:

  • buildstream/_artifactcache/artifactcache.py
    ... ... @@ -475,6 +475,10 @@ class ArtifactCache():
    475 475
         #
    
    476 476
         # Implementations should also use this to update estimated_size.
    
    477 477
         #
    
    478
    +    # This function might be called when there is a cleaning operation in
    
    479
    +    # progress on the artifact cache. So implementations must be able to
    
    480
    +    # coupe with no longer existing filepaths.
    
    481
    +    #
    
    478 482
         # Returns:
    
    479 483
         #
    
    480 484
         # (int) The size of the artifact cache.
    

  • buildstream/_artifactcache/cascache.py
    ... ... @@ -472,9 +472,12 @@ class CASCache(ArtifactCache):
    472 472
                 raise ArtifactError("Attempt to access unavailable artifact: {}".format(e)) from e
    
    473 473
     
    
    474 474
         def calculate_cache_size(self):
    
    475
    -        if self.cache_size is None:
    
    476
    -            self.cache_size = utils._get_dir_size(self.casdir)
    
    477
    -            self.estimated_size = self.cache_size
    
    475
    +        while self.cache_size is None:
    
    476
    +            try:
    
    477
    +                self.cache_size = utils._get_dir_size(self.casdir)
    
    478
    +                self.estimated_size = self.cache_size
    
    479
    +            except FileNotFoundError:
    
    480
    +                pass
    
    478 481
     
    
    479 482
             return self.cache_size
    
    480 483
     
    

  • buildstream/element.py
    ... ... @@ -369,8 +369,8 @@ class Element(Plugin):
    369 369
             generated script is run:
    
    370 370
     
    
    371 371
             - All element variables have been exported.
    
    372
    -        - The cwd is `self.get_variable('build_root')/self.normal_name`.
    
    373
    -        - $PREFIX is set to `self.get_variable('install_root')`.
    
    372
    +        - The cwd is `self.get_variable('build-root')/self.normal_name`.
    
    373
    +        - $PREFIX is set to `self.get_variable('install-root')`.
    
    374 374
             - The directory indicated by $PREFIX is an empty directory.
    
    375 375
     
    
    376 376
             Files are expected to be installed to $PREFIX.
    



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