summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-10 09:06:10 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2015-04-10 13:52:27 +0000
commit207f73f30c1b93a8fadaad80299cbe06876fa18f (patch)
tree478ae766fc507c2f2491380def21fb045f3227aa
parent9964c35e2a0355bbbe9d39119de309783d9b383e (diff)
downloadmorph-207f73f30c1b93a8fadaad80299cbe06876fa18f.tar.gz
fixup: More fixes to ostreeartifactcache
-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)