diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2015-06-02 13:43:41 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2015-06-12 08:56:43 +0000 |
commit | d95bd9ec7cdf78ee74c69ebe9df07d418bb1e5db (patch) | |
tree | 9f6004ff3732c52f14d9f4b48f1aead8edc9a094 /morphlib | |
parent | acdc5ceb0f8d7f1a2b21ed121b4139c67b52fb30 (diff) | |
download | morph-d95bd9ec7cdf78ee74c69ebe9df07d418bb1e5db.tar.gz |
cachekey/builder: Use and cache strip commands
Change-Id: I19a6c31979aa36ff3c03f41e16e2d25ef407533b
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/builder.py | 15 | ||||
-rw-r--r-- | morphlib/cachekeycomputer.py | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index 8caaaf39..6e706b82 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -336,15 +336,20 @@ class ChunkBuilder(BuilderBase): ('pre-install', False), ('install', False), ('post-install', False), + ('pre-strip', False), + ('strip', False), + ('post-strip', False), ] for step, in_parallel in steps: with self.build_watch(step): key = '%s-commands' % step - cmds = m[key] - if cmds: - with open(logfilepath, 'a') as log: - self.app.status(msg='Running %(key)s', key=key) - log.write('# %s\n' % step) + cmds = m.get(key) + if not cmds: + continue + + with open(logfilepath, 'a') as log: + self.app.status(msg='Running %(key)s', key=key) + log.write('# %s\n' % step) for cmd in cmds: if in_parallel: diff --git a/morphlib/cachekeycomputer.py b/morphlib/cachekeycomputer.py index fa6662cb..22f42aa0 100644 --- a/morphlib/cachekeycomputer.py +++ b/morphlib/cachekeycomputer.py @@ -106,7 +106,8 @@ class CacheKeyComputer(object): # include {pre-,,post-}{configure,build,test,install}-commands # in morphology key for prefix in ('pre-', '', 'post-'): - for cmdtype in ('configure', 'build', 'test', 'install'): + for cmdtype in ('configure', 'build', 'test', + 'install', 'strip'): cmd_field = prefix + cmdtype + '-commands' if cmd_field in morphology: keys[cmd_field] = morphology[cmd_field] |