From 207f73f30c1b93a8fadaad80299cbe06876fa18f Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Fri, 10 Apr 2015 09:06:10 +0000 Subject: fixup: More fixes to ostreeartifactcache --- morphlib/ostreeartifactcache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/morphlib/ostreeartifactcache.py b/morphlib/ostreeartifactcache.py index 2854a1cc..ed060e59 100644 --- a/morphlib/ostreeartifactcache.py +++ b/morphlib/ostreeartifactcache.py @@ -127,7 +127,7 @@ class OSTreeArtifactCache(object): chatty=True, name=artifact.basename()) try: ref = self._get_artifact_cache_name(artifact) - except Exception: + except ValueError: # if we can't split the name properly, we must want metadata a, name = artifact.basename().split('.', 1) with self._get_file_from_remote(ArtifactCacheReference(a), @@ -159,6 +159,9 @@ class OSTreeArtifactCache(object): ref = self._get_artifact_cache_name(artifact) try: self.repo.checkout(ref, directory) + # We need to update the mtime and atime of the ref file in the + # repository so that we can decide which refs were least recently + # accessed when doing `morph gc`. self.repo.touch_ref(ref) except GLib.GError as e: logging.debug('OSTree raised an exception: %s' % e) -- cgit v1.2.1