Browse Source

Merge pull request #8382 from sothix/8264-windows-ci-broken

Fix for #8264 Windows CI broken and #8381 Windows build failing
TW 8 months ago
parent
commit
4e05e78e35

+ 1 - 1
.github/workflows/ci.yml

@@ -196,7 +196,7 @@ jobs:
 
   windows:
 
-    if: false  # build is broken, thus disabled, see #8264
+    if: true  # build enabled
     runs-on: windows-latest
     timeout-minutes: 120
     needs: linux

+ 2 - 1
scripts/msys2-install-deps

@@ -1,6 +1,7 @@
 #!/bin/bash
 
-pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python-msgpack,python-argon2_cffi,python-platformdirs,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-pip}
+pacman -S --needed --noconfirm git mingw-w64-ucrt-x86_64-{toolchain,pkgconf,zstd,lz4,xxhash,openssl,python-msgpack,python-argon2_cffi,python-platformdirs,python,cython,python-setuptools,python-wheel,python-build,python-pkgconfig,python-packaging,python-pip,python-paramiko}
+python -m pip install --upgrade pip 
 pip install pyinstaller==6.3.0
 
 if [ "$1" = "development" ]; then

+ 1 - 0
src/borg/archive.py

@@ -196,6 +196,7 @@ class BackupIO:
         if exc_type and issubclass(exc_type, OSError):
             E_MAP = {
                 errno.EPERM: BackupPermissionError,
+                errno.EISDIR: BackupPermissionError,
                 errno.EACCES: BackupPermissionError,
                 errno.EBUSY: BackupPermissionError,
                 errno.ENOENT: BackupFileNotFoundError,

+ 2 - 2
src/borg/testsuite/archiver/extract_cmd.py

@@ -9,7 +9,7 @@ import pytest
 from ... import xattr
 from ...chunker import has_seek_hole
 from ...constants import *  # NOQA
-from ...helpers import EXIT_WARNING, BackupOSError
+from ...helpers import EXIT_WARNING, BackupPermissionError
 from ...helpers import flags_noatime, flags_normal
 from .. import changedir, same_ts_ns
 from .. import are_symlinks_supported, are_hardlinks_supported, is_utime_fully_supported, is_birthtime_fully_supported
@@ -621,7 +621,7 @@ def test_overwrite(archivers, request):
     os.unlink("output/input/file1")
     os.mkdir("output/input/file1")
     os.mkdir("output/input/file1/dir")
-    expected_ec = BackupOSError("open", OSError(21, "is a directory")).exit_code  # WARNING code
+    expected_ec = BackupPermissionError("open", OSError(21, "is a directory")).exit_code  # WARNING code
     if expected_ec == EXIT_ERROR:  # workaround, TODO: fix it
         expected_ec = EXIT_WARNING
     with changedir("output"):