summaryrefslogtreecommitdiff
path: root/buildstream/plugins/elements/compose.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/plugins/elements/compose.py')
-rw-r--r--buildstream/plugins/elements/compose.py25
1 files changed, 7 insertions, 18 deletions
diff --git a/buildstream/plugins/elements/compose.py b/buildstream/plugins/elements/compose.py
index b6a1a2973..c6ac1bfbf 100644
--- a/buildstream/plugins/elements/compose.py
+++ b/buildstream/plugins/elements/compose.py
@@ -119,36 +119,25 @@ class ComposeElement(Element):
if require_split:
# Make a snapshot of all the files before integration-commands are run.
- snapshot = vbasedir.list_relative_paths_with_mtimes()
+ snapshot = set(vbasedir.list_relative_paths())
+ vbasedir.mark_unmodified()
+
for dep in self.dependencies(Scope.BUILD):
dep.integrate(sandbox)
if require_split:
# Calculate added, modified and removed files
- post_integration_snapshot = vbasedir.list_relative_paths_with_mtimes()
-
- basedir_contents = set(post_integration_snapshot.keys())
+ post_integration_snapshot = vbasedir.list_relative_paths()
+ modified_files = set(vbasedir.list_modified_paths())
+ basedir_contents = set(post_integration_snapshot)
for path in manifest:
- if path in basedir_contents:
- if path in snapshot:
- preintegration_mtime = snapshot[path]
- if preintegration_mtime != post_integration_snapshot[path]:
- modified_files.add(path)
- else:
- # If the path appears in the manifest but not the initial snapshot,
- # it may be a file staged inside a directory symlink. In this case
- # the path we got from the manifest won't show up in the snapshot
- # because utils.list_relative_paths() doesn't recurse into symlink
- # directories.
- pass
- elif path in snapshot:
+ if path in snapshot and not path in basedir_contents:
removed_files.add(path)
for path in basedir_contents:
if path not in snapshot:
added_files.add(path)
-
self.info("Integration modified {}, added {} and removed {} files"
.format(len(modified_files), len(added_files), len(removed_files)))