From 212bc8ce91237d28de326e84ff8607863602d1f7 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Fri, 3 Apr 2020 10:54:43 -0400 Subject: dev-lang/python: ignore EPERM in test.support.unlink() Closes: https://bugs.gentoo.org/679628 Package-Manager: Portage-2.3.96_p4, Repoman-2.3.22_p1 Signed-off-by: Mike Gilbert --- .../files/test.support.unlink-ignore-EPERM.patch | 28 ++++++++++++++++++++++ ...est.support.unlink-ignore-PermissionError.patch | 28 ++++++++++++++++++++++ dev-lang/python/python-2.7.17-r1.ebuild | 1 + dev-lang/python/python-3.6.10.ebuild | 1 + dev-lang/python/python-3.7.6.ebuild | 1 + dev-lang/python/python-3.7.7.ebuild | 1 + dev-lang/python/python-3.8.2.ebuild | 1 + dev-lang/python/python-3.9.0_alpha4.ebuild | 1 + dev-lang/python/python-3.9.0_alpha5.ebuild | 1 + 9 files changed, 63 insertions(+) create mode 100644 dev-lang/python/files/test.support.unlink-ignore-EPERM.patch create mode 100644 dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch diff --git a/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch new file mode 100644 index 000000000000..291398137c7b --- /dev/null +++ b/dev-lang/python/files/test.support.unlink-ignore-EPERM.patch @@ -0,0 +1,28 @@ +From 789c61e1a1966241d274012cdbd5fb9716448952 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 3 Apr 2020 10:37:56 -0400 +Subject: [PATCH] test.support.unlink: ignore EPERM + +Resolves test errors when running in the Gentoo sandbox environment. + +Bug: https://bugs.gentoo.org/679628 +--- + Lib/test/support/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py +index ccc11c1b4b0..c5ec06bb420 100644 +--- a/Lib/test/support/__init__.py ++++ b/Lib/test/support/__init__.py +@@ -291,7 +291,7 @@ def unlink(filename): + try: + _unlink(filename) + except OSError as exc: +- if exc.errno not in (errno.ENOENT, errno.ENOTDIR): ++ if exc.errno not in (errno.ENOENT, errno.ENOTDIR, errno.EPERM): + raise + + def rmdir(dirname): +-- +2.26.0 + diff --git a/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch new file mode 100644 index 000000000000..6cae17b55189 --- /dev/null +++ b/dev-lang/python/files/test.support.unlink-ignore-PermissionError.patch @@ -0,0 +1,28 @@ +From 6e6402caa7962a9c9f7c5327f3c802545824f7f9 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Fri, 3 Apr 2020 10:37:56 -0400 +Subject: [PATCH] test.support.unlink: ignore PermissionError + +Resolves test errors when running in the Gentoo sandbox environment. + +Bug: https://bugs.gentoo.org/679628 +--- + Lib/test/support/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py +index 1f792d8514d..a0772480eb4 100644 +--- a/Lib/test/support/__init__.py ++++ b/Lib/test/support/__init__.py +@@ -488,7 +488,7 @@ else: + def unlink(filename): + try: + _unlink(filename) +- except (FileNotFoundError, NotADirectoryError): ++ except (FileNotFoundError, NotADirectoryError, PermissionError): + pass + + def rmdir(dirname): +-- +2.26.0 + diff --git a/dev-lang/python/python-2.7.17-r1.ebuild b/dev-lang/python/python-2.7.17-r1.ebuild index 87a23fa5fb6c..f38156d7d51b 100644 --- a/dev-lang/python/python-2.7.17-r1.ebuild +++ b/dev-lang/python/python-2.7.17-r1.ebuild @@ -88,6 +88,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-EPERM.patch" ) default diff --git a/dev-lang/python/python-3.6.10.ebuild b/dev-lang/python/python-3.6.10.ebuild index fabe76bc113a..c572c8146d02 100644 --- a/dev-lang/python/python-3.6.10.ebuild +++ b/dev-lang/python/python-3.6.10.ebuild @@ -65,6 +65,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default diff --git a/dev-lang/python/python-3.7.6.ebuild b/dev-lang/python/python-3.7.6.ebuild index 35666215d463..8f29c79414d4 100644 --- a/dev-lang/python/python-3.7.6.ebuild +++ b/dev-lang/python/python-3.7.6.ebuild @@ -66,6 +66,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default diff --git a/dev-lang/python/python-3.7.7.ebuild b/dev-lang/python/python-3.7.7.ebuild index 07492f4fb2a3..d57ddee45e63 100644 --- a/dev-lang/python/python-3.7.7.ebuild +++ b/dev-lang/python/python-3.7.7.ebuild @@ -66,6 +66,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default diff --git a/dev-lang/python/python-3.8.2.ebuild b/dev-lang/python/python-3.8.2.ebuild index edf2079cfe59..35d435345995 100644 --- a/dev-lang/python/python-3.8.2.ebuild +++ b/dev-lang/python/python-3.8.2.ebuild @@ -66,6 +66,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default diff --git a/dev-lang/python/python-3.9.0_alpha4.ebuild b/dev-lang/python/python-3.9.0_alpha4.ebuild index c0e9c0256eb0..49d4c9d5f877 100644 --- a/dev-lang/python/python-3.9.0_alpha4.ebuild +++ b/dev-lang/python/python-3.9.0_alpha4.ebuild @@ -82,6 +82,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default diff --git a/dev-lang/python/python-3.9.0_alpha5.ebuild b/dev-lang/python/python-3.9.0_alpha5.ebuild index c0e9c0256eb0..49d4c9d5f877 100644 --- a/dev-lang/python/python-3.9.0_alpha5.ebuild +++ b/dev-lang/python/python-3.9.0_alpha5.ebuild @@ -82,6 +82,7 @@ src_prepare() { local PATCHES=( "${WORKDIR}/${PATCHSET}" + "${FILESDIR}/test.support.unlink-ignore-PermissionError.patch" ) default -- cgit v1.2.3-65-gdbad