summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/ostreeartifactcache.py5
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)