summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGökçen Nurlu <gnurlu1@bloomberg.net>2018-06-01 11:32:20 +0100
committerGökçen Nurlu <gnurlu1@bloomberg.net>2018-06-01 16:04:31 +0100
commitc01f0df533e6dbf5aae63f8753ed8e6e2f88359d (patch)
treea520c080e2cb95c4ff666401a098e77b58fb6116
parent311b108f996f5e734d10be8db7fb8903f2933f78 (diff)
downloadbuildstream-gokcen/sandbox_cleanup_fix.tar.gz
_sandboxbwrap.py: Fix post-bwrap cleanup behaviourgokcen/sandbox_cleanup_fix
The cleanup was supposed not to remove folders (`/dev`, `/tmp`, `/proc`) if they already existed before bwrap but it did the opposite: it tried to remove them if they existed before, and didn't remove them if they were created during bwrap. This was caused by a `not` clause, and this removes it. Fixes #379
-rw-r--r--buildstream/sandbox/_sandboxbwrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index d18cb9ec0..798bcb690 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -207,7 +207,7 @@ class SandboxBwrap(Sandbox):
# Skip removal of directories which already existed before
# launching bwrap
- if not existing_basedirs[basedir]:
+ if existing_basedirs[basedir]:
continue
base_directory = os.path.join(root_mount_source, basedir)