summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin David <valentin.david@gmail.com>2017-11-23 23:46:41 +0100
committerValentin David <valentin.david@gmail.com>2017-11-27 21:01:37 +0100
commit02cc8d03faf9201847e173d2d1474f8dd0fd3c30 (patch)
tree924f0c6485b5a55a3c9a7380179e06a575327a66
parent5c37208c5c5df1925a0bb280933772feb04cb674 (diff)
downloadbuildstream-02cc8d03faf9201847e173d2d1474f8dd0fd3c30.tar.gz
Remove all deleted paths from manifest after integration commands in
compose plugin including paths still reachable through following of symbolic links. Keeping reachable paths through following of symbolic links in manifest. Can lead to ENOENT error when copying the file if target directory of a symbolic link is not yet created. The file is anyway copied since the real path of the file is also in the manifest.
-rw-r--r--buildstream/plugins/elements/compose.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildstream/plugins/elements/compose.py b/buildstream/plugins/elements/compose.py
index 6acd8d5d4..29e289a30 100644
--- a/buildstream/plugins/elements/compose.py
+++ b/buildstream/plugins/elements/compose.py
@@ -125,8 +125,10 @@ class ComposeElement(Element):
if require_split:
+ seen = set()
# Calculate added modified files
for path in utils.list_relative_paths(basedir):
+ seen.add(path)
if snapshot.get(path) is None:
added_files.append(path)
elif snapshot[path] != getmtime(os.path.join(basedir, path)):
@@ -135,7 +137,7 @@ class ComposeElement(Element):
# Calculate removed files
removed_files = [
path for path in manifest
- if not os.path.lexists(os.path.join(basedir, path))
+ if path not in seen
]
self.info("Integration modified {}, added {} and removed {} files"
.format(len(modified_files), len(added_files), len(removed_files)))