diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-11 21:58:53 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-11 21:58:53 +0000 |
commit | 9ef86488b5b5564669fb6ddedc390613b24042e3 (patch) | |
tree | 98c413a023fef807c7a418273ec4cf31edb13e82 /morphlib/plugins/gc_plugin.py | |
parent | f6563a218b32704e6f2aa72e8436db2e90d71f8e (diff) | |
download | morph-9ef86488b5b5564669fb6ddedc390613b24042e3.tar.gz |
Only attempt to clean up artifacts
Because the whole cachedir was considered, and not just the
artifacts tree, it would recursively consider every file an
artifact, incuding cached gits and ccache.
This made it slower and remove things before they were due, since
only the artifact cache is guaranteed to set mtimes on access.
This wouldn't cause incorrect builds, since any cached objects get
re-generated, but it was definitely not desired behaviour.
Diffstat (limited to 'morphlib/plugins/gc_plugin.py')
-rw-r--r-- | morphlib/plugins/gc_plugin.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/morphlib/plugins/gc_plugin.py b/morphlib/plugins/gc_plugin.py index ded4cf02..1adabe78 100644 --- a/morphlib/plugins/gc_plugin.py +++ b/morphlib/plugins/gc_plugin.py @@ -113,7 +113,8 @@ class GCPlugin(cliapp.Plugin): 'sufficient space already cleared', chatty=True) return - lac = morphlib.localartifactcache.LocalArtifactCache(cache_path) + lac = morphlib.localartifactcache.LocalArtifactCache( + os.path.join(cache_path, 'artifacts')) max_age, min_age = self.calculate_delete_range() logging.debug('Must remove artifacts older than timestamp %d' % max_age) |