summaryrefslogtreecommitdiff
path: root/morphlib/builder.py
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-02-20 15:48:26 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2015-04-20 14:07:41 +0000
commita97d8b313d931bfc6d8c1341af91fc48a8250f33 (patch)
tree525d4b5600181fb6973611e1492c6c99a485bc39 /morphlib/builder.py
parentbab0adb513519ad6e76ad54f65a2dd226ba9c167 (diff)
downloadmorph-a97d8b313d931bfc6d8c1341af91fc48a8250f33.tar.gz
Add an artifact cache which uses OSTree
Change-Id: Ie591875d0507b4f43da3e91d4ca63e0a4dc7cbf2
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r--morphlib/builder.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py
index 735e70aa..6fc871fc 100644
--- a/morphlib/builder.py
+++ b/morphlib/builder.py
@@ -125,11 +125,7 @@ def ldconfig(runcmd, rootdir): # pragma: no cover
def download_depends(constituents, lac, rac, metadatas=None):
for constituent in constituents:
if not lac.has(constituent):
- source = rac.get(constituent)
- target = lac.put(constituent)
- shutil.copyfileobj(source, target)
- target.close()
- source.close()
+ lac.copy_from_remote(constituent, rac)
if metadatas is not None:
for metadata in metadatas:
if not lac.has_artifact_metadata(constituent, metadata):