You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2022/07/08 08:33:59 UTC

[buildstream] 01/02: buildelement.py: Don't mark layout locations as read-write directories

This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch juerg/layout-directories
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit ab5b1d1e3446aeb79eeb6de9e7ca710a5cbc8645
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Fri Jul 8 09:50:47 2022 +0200

    buildelement.py: Don't mark layout locations as read-write directories
    
    `mark_directory()` was originally called on layout locations to enable
    SafeHardlinks to protect the CAS cache from corruption. This is no
    longer relevant.
    
    This prevents the root directory of the sandbox from accidentally being
    marked as REAPI output directory, avoiding expensive capture operations.
---
 src/buildstream/buildelement.py | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/buildstream/buildelement.py b/src/buildstream/buildelement.py
index f9dc36fae..ec508f59c 100644
--- a/src/buildstream/buildelement.py
+++ b/src/buildstream/buildelement.py
@@ -258,10 +258,6 @@ class BuildElement(Element):
         sandbox.mark_directory(build_root)
         sandbox.mark_directory(install_root)
 
-        # Mark the artifact directories in the layout
-        for location in self.__layout:
-            sandbox.mark_directory(location)
-
         # Allow running all commands in a specified subdirectory
         if self._command_subdir:
             command_dir = os.path.join(build_root, self._command_subdir)