diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-09-10 10:22:30 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-09-19 12:43:25 +0000 |
commit | 59e1a82ab96115b6630269de28aadecf61d9bba9 (patch) | |
tree | 1bab94717a4ea2ab6522996d2613f758485e7f63 /morphlib/builder2.py | |
parent | 90b3106de52d716f0ec08c5928a921db04b2eac8 (diff) | |
download | morph-59e1a82ab96115b6630269de28aadecf61d9bba9.tar.gz |
Eliminate BuilderBase.new_artifact
It was an odd thing to have, when Artifact objects are part of your
input.
Its purpose appears to have been to allow the build step to produce an
artifact called $morphology_name-rootfs, but since the split rules
decide that the artifact is called that anyway, the new_artifact step is
redundant.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 8031f26f..681ad6be 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -299,12 +299,6 @@ class BuilderBase(object): json.dump(meta, f, indent=4, sort_keys=True, encoding='unicode-escape') f.close() - def new_artifact(self, artifact_name): - '''Return an Artifact object for something built from our source.''' - a = morphlib.artifact.Artifact(self.artifact.source, artifact_name) - a.cache_key = self.artifact.cache_key - return a - def runcmd(self, *args, **kwargs): return self.staging_area.runcmd(*args, **kwargs) @@ -607,9 +601,8 @@ class SystemBuilder(BuilderBase): # pragma: no cover with self.build_watch('overall-build'): arch = self.artifact.source.morphology['arch'] - rootfs_name = self.artifact.source.morphology['name'] + '-rootfs' - rootfs_artifact = self.new_artifact(rootfs_name) - handle = self.local_artifact_cache.put(rootfs_artifact) + rootfs_name = self.artifact.source.morphology['name'] + handle = self.local_artifact_cache.put(self.artifact) try: fs_root = self.staging_area.destdir(self.artifact.source) |