From: Alon Bar-Lev Date: Sat, 6 Jan 2018 20:44:52 +0000 (+0200) Subject: app-crypt/gpgme: fail pretend if workdir is too long X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=667661ef848cdf373d55784a00158c630135fedb;p=gentoo.git app-crypt/gpgme: fail pretend if workdir is too long Bug: https://bugs.gentoo.org/643696 Package-Manager: Portage-2.3.13, Repoman-2.3.3 --- diff --git a/app-crypt/gpgme/gpgme-1.10.0.ebuild b/app-crypt/gpgme/gpgme-1.10.0.ebuild index 34e7e743665a..81ca9ecddb2f 100644 --- a/app-crypt/gpgme/gpgme-1.10.0.ebuild +++ b/app-crypt/gpgme/gpgme-1.10.0.ebuild @@ -44,10 +44,26 @@ do_python() { fi } +pkg_pretend() { + local MAX_WORKDIR=66 + + [[ "${#WORKDIR}" -le "${MAX_WORKDIR}" ]] || + die "Cannot build package as WORKDIR '${WORKDIR}' is longer than ${MAX_WORKDIR} which will fail build" +} + pkg_setup() { addpredict /run/user/$(id -u)/gnupg } +src_prepare() { + default + + # Make best effort to allow longer PORTAGE_TMPDIR + # as usock limitation fails build/tests + ln -s "${P}" "${WORKDIR}/b" + S="${WORKDIR}/b" +} + src_configure() { local languages=() use common-lisp && languages+=( "cl" )