commit:     51998da7a6030001d4af9eab035115bbd6cfb897
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 15 03:06:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 15 03:06:53 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51998da7

app-backup/duplicity: workaround too-long PORTAGE_TMPDIR

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-backup/duplicity/duplicity-3.0.6.3-r1.ebuild | 11 +++++++++++
 app-backup/duplicity/duplicity-9999.ebuild       | 11 +++++++++++
 2 files changed, 22 insertions(+)

diff --git a/app-backup/duplicity/duplicity-3.0.6.3-r1.ebuild 
b/app-backup/duplicity/duplicity-3.0.6.3-r1.ebuild
index 38a6a85b16b3..04d5fc69a92f 100644
--- a/app-backup/duplicity/duplicity-3.0.6.3-r1.ebuild
+++ b/app-backup/duplicity/duplicity-3.0.6.3-r1.ebuild
@@ -66,6 +66,17 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+python_test() {
+       # The default portage tempdir is too long for AF_UNIX sockets
+       local -x TMPDIR DOCKER_GNUPGHOME
+       TMPDIR="$(mktemp -d --tmpdir=/tmp ${PF}-XXX || die)"
+       # testing/__init__.py doesn't respect GNUPGHOME
+       DOCKER_GNUPGHOME="${TMPDIR}/gnupg"
+       cp -ar "${S}"/testing/gnupg "${DOCKER_GNUPGHOME}"/ || die
+
+       epytest
+}
+
 pkg_postinst() {
        elog "Duplicity has many optional dependencies to support various 
backends."
        elog "Currently it's up to you to install them as necessary."

diff --git a/app-backup/duplicity/duplicity-9999.ebuild 
b/app-backup/duplicity/duplicity-9999.ebuild
index 38a6a85b16b3..04d5fc69a92f 100644
--- a/app-backup/duplicity/duplicity-9999.ebuild
+++ b/app-backup/duplicity/duplicity-9999.ebuild
@@ -66,6 +66,17 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+python_test() {
+       # The default portage tempdir is too long for AF_UNIX sockets
+       local -x TMPDIR DOCKER_GNUPGHOME
+       TMPDIR="$(mktemp -d --tmpdir=/tmp ${PF}-XXX || die)"
+       # testing/__init__.py doesn't respect GNUPGHOME
+       DOCKER_GNUPGHOME="${TMPDIR}/gnupg"
+       cp -ar "${S}"/testing/gnupg "${DOCKER_GNUPGHOME}"/ || die
+
+       epytest
+}
+
 pkg_postinst() {
        elog "Duplicity has many optional dependencies to support various 
backends."
        elog "Currently it's up to you to install them as necessary."

Reply via email to