diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-30 18:38:57 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-30 18:38:57 +0000 |
commit | d887e2341ebd080602107a6904fe024f89abbb18 (patch) | |
tree | 3ee11e68683f3e794c095aa8cc7f8bde589e4b92 /morph | |
parent | 17d2adcd9311cadb7cabd7c22af7b07c5956aa6a (diff) | |
download | morph-d887e2341ebd080602107a6904fe024f89abbb18.tar.gz |
Fix "morph update-gits" to update all dependency repos properly.
Computing the cache ID will not update all dependencies, just some
of them (e.g. the chunk repos a stratum morph needs). Resolving
the dependency graph, however, will update everything.
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -203,7 +203,6 @@ class Morph(cliapp.Application): self.output.write(' %s\n' % blob) def cmd_update_gits(self, args): - tempdir = morphlib.tempdir.Tempdir() morph_loader = MorphologyLoader(self.settings) source_manager = morphlib.sourcemanager.SourceManager(self) while len(args) >= 3: @@ -211,16 +210,11 @@ class Morph(cliapp.Application): repo, ref, filename = args[:3] args = args[3:] - # first step: clone the corresponding repo - treeish = source_manager.get_treeish(repo, ref) - morph = morph_loader.load(treeish, filename) - blob = morphlib.blobs.Blob.create_blob(morph) - - # second step: compute the cache ID, which will implicitly + # resolve the dependency graph, which will implicitly # clone all repositories needed to build the blob - builder = morphlib.builder.Builder(tempdir, self, morph_loader, - source_manager) - builder.get_cache_id(blob) + graph = BuildDependencyGraph(source_manager, morph_loader, + repo, ref, filename) + graph.resolve() def cmd_build_single(self, args): tempdir = morphlib.tempdir.Tempdir() |