diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-10 09:06:10 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2015-04-10 13:52:27 +0000 |
commit | 207f73f30c1b93a8fadaad80299cbe06876fa18f (patch) | |
tree | 478ae766fc507c2f2491380def21fb045f3227aa /morphlib | |
parent | 9964c35e2a0355bbbe9d39119de309783d9b383e (diff) | |
download | morph-207f73f30c1b93a8fadaad80299cbe06876fa18f.tar.gz |
fixup: More fixes to ostreeartifactcache
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/ostreeartifactcache.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |