浏览代码

Merge pull request #4216 from ThomasWaldmann/fwd-ports

Fwd ports
TW 6 年之前
父节点
当前提交
9e05bf9cde
共有 2 个文件被更改,包括 10 次插入5 次删除
  1. 6 5
      Vagrantfile
  2. 4 0
      src/borg/platform/linux.pyx

+ 6 - 5
Vagrantfile

@@ -111,7 +111,8 @@ def install_pythons(boxname)
     . ~/.bash_profile
     pyenv install 3.7.0  # tests
     pyenv install 3.6.0  # tests
-    pyenv install 3.6.6  # binary build, use latest 3.6.x release
+    pyenv install 3.5.0  # tests
+    pyenv install 3.6.7  # binary build, use latest 3.6.x release
     pyenv rehash
   EOF
 end
@@ -129,8 +130,8 @@ def build_pyenv_venv(boxname)
     . ~/.bash_profile
     cd /vagrant/borg
     # use the latest 3.6 release
-    pyenv global 3.6.6
-    pyenv virtualenv 3.6.6 borg-env
+    pyenv global 3.6.7
+    pyenv virtualenv 3.6.7 borg-env
     ln -s ~/.pyenv/versions/borg-env .
   EOF
 end
@@ -190,8 +191,8 @@ def run_tests(boxname)
     . ../borg-env/bin/activate
     if which pyenv 2> /dev/null; then
       # for testing, use the earliest point releases of the supported python versions:
-      pyenv global 3.6.0 3.7.0
-      pyenv local 3.6.0 3.7.0
+      pyenv global 3.5.0 3.6.0 3.7.0
+      pyenv local 3.5.0 3.6.0 3.7.0
     fi
     # otherwise: just use the system python
     if which fakeroot 2> /dev/null; then

+ 4 - 0
src/borg/platform/linux.pyx

@@ -273,6 +273,10 @@ def acl_set(path, item, numeric_owner=False, fd=None):
     cdef acl_t access_acl = NULL
     cdef acl_t default_acl = NULL
 
+    if stat.S_ISLNK(item.get('mode', 0)):
+        # Linux does not support setting ACLs on symlinks
+        return
+
     if fd is None and isinstance(path, str):
         path = os.fsencode(path)
     if numeric_owner: