diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-01 15:13:47 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-14 16:33:06 +0000 |
commit | a7bd4278e355c78b5197e2df5663f3ce0acf23eb (patch) | |
tree | 0311bb2eae02f5fbb08ebb3987e2ab3c9e554593 /morphlib/buildcommand.py | |
parent | 6a7f431f21764d1d2ec12faabc159f6cf89a8b38 (diff) | |
download | morph-a7bd4278e355c78b5197e2df5663f3ce0acf23eb.tar.gz |
Remove the chunk hardlink cachebaserock/adamcoldrick/ostree
The OSTree checkout uses hardlinks anyway, so this is thankfully now
redundant. Most of this work was done by Sam Thursfield
<sam.thursfield@codethink.co.uk>.
Change-Id: I5be211ad3034331834f7b0542721f1bfc024b863
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r-- | morphlib/buildcommand.py | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index 76f8bd99..cab38395 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -492,32 +492,13 @@ class BuildCommand(object): if artifact.source.build_mode == 'bootstrap': if not self.in_same_stratum(artifact.source, target_source): continue + self.app.status( msg='Installing chunk %(chunk_name)s from cache %(cache)s', chunk_name=artifact.name, cache=artifact.source.cache_key[:7], chatty=True) - chunk_cache_dir = os.path.join(self.app.settings['tempdir'], - 'chunks') - artifact_checkout = os.path.join( - chunk_cache_dir, os.path.basename(artifact.basename()) + '.d') - if not os.path.exists(artifact_checkout): - self.app.status( - msg='Checking out %(chunk)s from cache.', - chunk=artifact.name - ) - temp_checkout = os.path.join(self.app.settings['tempdir'], - artifact.basename()) - try: - self.lac.get(artifact, temp_checkout) - except BaseException: - shutil.rmtree(temp_checkout) - raise - # TODO: This rename is not concurrency safe if two builds are - # extracting the same chunk, one build will fail because - # the other renamed its tempdir here first. - os.rename(temp_checkout, artifact_checkout) - staging_area.install_artifact(artifact, artifact_checkout) + staging_area.install_artifact(self.lac, artifact) if target_source.build_mode == 'staging': morphlib.builder.ldconfig(self.app.runcmd, staging_area.dirname) |