diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-20 14:37:30 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-07 13:54:52 +0000 |
commit | ae007688d8f1f57b138dafffdfc3683aa7c7730f (patch) | |
tree | 9a688fd5bd1ee3e733a341cf54c38571bb507aea /morphlib/sysbranchdir.py | |
parent | dc16450fa37c715a81b61213ade807734b404914 (diff) | |
download | morph-ae007688d8f1f57b138dafffdfc3683aa7c7730f.tar.gz |
Don't attempt to load symlinks as morphologies
This was noticed because our definitions.git had a dangling symlink,
so it failed to construct the temporary build branch.
We shouldn't process symlinks as morphologies either, since either we
make symlinked morphologies a first-class behaviour, and validate that
the link points inside the repository, which is a lot of work for
something we don't and probably won't need; or we can just assume that
we deal with the morphology this is linked to correctly anyway.
Diffstat (limited to 'morphlib/sysbranchdir.py')
-rw-r--r-- | morphlib/sysbranchdir.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/sysbranchdir.py b/morphlib/sysbranchdir.py index ee6a3cc7..b8953c2f 100644 --- a/morphlib/sysbranchdir.py +++ b/morphlib/sysbranchdir.py @@ -176,7 +176,8 @@ class SystemBranchDirectory(object): gd_name = self.get_git_directory_name(self.root_repository_url) gd = morphlib.gitdir.GitDirectory(gd_name) mf = morphlib.morphologyfinder.MorphologyFinder(gd) - for filename in mf.list_morphologies(): + for filename in (f for f in mf.list_morphologies() + if not gd.is_symlink(f)): text = mf.read_morphology(filename) m = loader.load_from_string(text, filename=filename) m.repo_url = self.root_repository_url |