diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-18 11:56:28 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-04-19 11:22:06 +0100 |
commit | d4cf63b0283a9bce2c95b80fc72f07ef8ec0a3e7 (patch) | |
tree | 56bdc1f29a9a00c94b2a1b547ba3d4fff17b0231 /morph | |
parent | 96afbd0a8f8c906258207c447320c30cabbcecae (diff) | |
download | morph-d4cf63b0283a9bce2c95b80fc72f07ef8ec0a3e7.tar.gz |
morph: try not needing a morph for chunks
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -334,26 +334,33 @@ class Morph(cliapp.Application): cachedir, baseurls, bundle_base_url) # Reverse so we process things in the order given by the user. - queue = collections.deque(self._itertriplets(args)) + queue = collections.deque((n, r, f, None) + for n, r, f in self._itertriplets(args)) while queue: - reponame, ref, filename = queue.popleft() + reponame, ref, filename, kind = queue.popleft() self.msg('Updating %s|%s|%s' % (reponame, ref, filename)) repo = cache.cache_repo(reponame) repo.update() + if kind == 'chunk': + continue absref = repo.resolve_ref(ref) text = repo.cat(absref, filename) morphology = morphlib.morph2.Morphology(text) - if morphology['kind'] == 'system': + if kind == None: + kind = morphology['kind'] + if kind == 'system': for stratum in morphology['strata']: - queue.append((reponame, ref, '%s.morph' % stratum)) - elif morphology['kind'] == 'stratum': + queue.append((reponame, ref, '%s.morph' % stratum, + 'stratum')) + elif kind == 'stratum': if morphology['build-depends']: for stratum in morphology['build-depends']: - queue.append((reponame, ref, '%s.morph' % stratum)) + queue.append((reponame, ref, '%s.morph' % stratum, + 'stratum')) for x in morphology['sources']: queue.append((x['repo'], x['ref'], - '%s.morph' % x['morph'])) + '%s.morph' % x['morph'], 'chunk')) def cmd_build_single(self, args): '''Build a binary from a morphology but do not build its dependencies. |