summaryrefslogtreecommitdiff
path: root/buildstream/_artifactcache.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-11 21:25:47 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-12 15:19:15 +0900
commit3f6b273aa163d438c85de45755f949019a11db99 (patch)
tree373b6ba7c1f2ff028c244e14434cbf49b6c7b4c0 /buildstream/_artifactcache.py
parenteec8557522d32d1afc9ef59f872d811fcc133289 (diff)
downloadbuildstream-3f6b273aa163d438c85de45755f949019a11db99.tar.gz
_artifactcache.py: Restore old functionality now that it works.
So now we use: o bare user repository o set file uid/gid = 0 at commit time o user mode checkouts. This ensures we have hardlinks to check out, and that we have permission to create those files. With recent ostree this means that the only losses are: o No xattrs o Stripped suid/sgid permission bits o Ownership assigned to active user In older ostree versions, this munges the permission bits further.
Diffstat (limited to 'buildstream/_artifactcache.py')
-rw-r--r--buildstream/_artifactcache.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/buildstream/_artifactcache.py b/buildstream/_artifactcache.py
index 2db41b7ae..a4e7dcd4a 100644
--- a/buildstream/_artifactcache.py
+++ b/buildstream/_artifactcache.py
@@ -57,12 +57,6 @@ class ArtifactCache():
self.extractdir = os.path.join(context.artifactdir, 'extract')
self.repo = _ostree.ensure(ostreedir, False)
- # XXX FIXME: We're using compression here to avoid the hardlinks !
- # We should be using hardlinks but need to fix
- # https://gitlab.com/BuildStream/buildstream/issues/19
- #
- self.repo = _ostree.ensure(ostreedir, True)
-
# contains():
#
# Check whether the artifact for the specified Element is already available
@@ -114,7 +108,7 @@ class ArtifactCache():
checkoutdir = os.path.join(tmpdir, ref)
- _ostree.checkout(self.repo, checkoutdir, rev)
+ _ostree.checkout(self.repo, checkoutdir, rev, user=True)
os.makedirs(os.path.dirname(dest), exist_ok=True)
try: