diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-10-30 15:50:27 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-10-30 15:50:27 +0000 |
commit | 242e16e592da6ef0bb3b8f36ba5ce3eb01c0c1ba (patch) | |
tree | 254098f8d4597e206cf674172caffd6c7f510424 /morphlib/fsutils.py | |
parent | f786b2f6f4b4db8c3410c4e8991c36df8d752a27 (diff) | |
parent | 53ce07c7062fc5bad7fa4c470b1824393474277d (diff) | |
download | morph-242e16e592da6ef0bb3b8f36ba5ce3eb01c0c1ba.tar.gz |
Merge branch 'baserock/richardmaw-os/unify-namespace-logic'
This removes the last case of global mounting that could cause issues
for being able to run multiple builds in parallel.
There's still concurrent access to caches and git servers that could
cause issues, but with this, it's possible to run morph in the
test-suite in parallel.
Reviewed-by: Daniel Silverstone
Reviewed-by: Sam Thursfield
Diffstat (limited to 'morphlib/fsutils.py')
-rw-r--r-- | morphlib/fsutils.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/fsutils.py b/morphlib/fsutils.py index 751f73f6..6d651171 100644 --- a/morphlib/fsutils.py +++ b/morphlib/fsutils.py @@ -104,6 +104,11 @@ def invert_paths(tree_walker, paths): for dirpath, dirnames, filenames in tree_walker: + if any(p == dirpath for p in paths): # pragma: no cover + # Dir is an exact match for a path + # don't recurse any further + # Don't yield it, since we don't return listed paths + continue dn_copy = list(dirnames) for subdir in dn_copy: subdirpath = os.path.join(dirpath, subdir) |