This is an automated email from the ASF dual-hosted git repository. tvb pushed a commit to branch tristan/virtual-directory-cleanup in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 841ed198570abd17f63bccb0bbb4e27d4f4dde89 Author: Tristan van Berkom <[email protected]> AuthorDate: Fri Mar 4 16:37:07 2022 +0900 storage/directory.py: Remove _mark_changed() internal API. This is not implemented by any directory implementation, and unused. --- src/buildstream/storage/_casbaseddirectory.py | 5 ----- src/buildstream/storage/_filebaseddirectory.py | 3 --- src/buildstream/storage/directory.py | 10 ---------- 3 files changed, 18 deletions(-) diff --git a/src/buildstream/storage/_casbaseddirectory.py b/src/buildstream/storage/_casbaseddirectory.py index 298624a..5130ded 100644 --- a/src/buildstream/storage/_casbaseddirectory.py +++ b/src/buildstream/storage/_casbaseddirectory.py @@ -611,11 +611,6 @@ class CasBasedDirectory(Directory): else: raise DirectoryError("can not export file type {} to tar".format(entry.type)) - def _mark_changed(self): - """ It should not be possible to externally modify a CAS-based - directory at the moment.""" - raise NotImplementedError() - def is_empty(self): """ Return true if this directory has no files, subdirectories or links in it. """ diff --git a/src/buildstream/storage/_filebaseddirectory.py b/src/buildstream/storage/_filebaseddirectory.py index 6a06858..17d84ca 100644 --- a/src/buildstream/storage/_filebaseddirectory.py +++ b/src/buildstream/storage/_filebaseddirectory.py @@ -151,9 +151,6 @@ class FileBasedDirectory(Directory): shutil.copyfile(external_pathspec, dstpath, follow_symlinks=False) return result - def _mark_changed(self): - pass - def set_deterministic_user(self): _set_deterministic_user(self.external_directory) diff --git a/src/buildstream/storage/directory.py b/src/buildstream/storage/directory.py index 9fd106a..9edf42d 100644 --- a/src/buildstream/storage/directory.py +++ b/src/buildstream/storage/directory.py @@ -183,16 +183,6 @@ class Directory: """ raise NotImplementedError() - def _mark_changed(self): - """Internal function to mark this directory as having been changed - outside this API. This normally can only happen by calling the - Sandbox's `run` method. This does *not* mark everything as modified - (i.e. list_modified_paths will not necessarily return the same results - as list_relative_paths after calling this.) - - """ - raise NotImplementedError() - def get_size(self): """ Get an approximation of the storage space in bytes used by this directory and all files and subdirectories in it. Storage space varies by implementation
