From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3302138334 for ; Sat, 9 Mar 2019 07:40:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD888E0833; Sat, 9 Mar 2019 07:40:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7F720E0833 for ; Sat, 9 Mar 2019 07:40:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E914E335CC8 for ; Sat, 9 Mar 2019 07:40:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 568E454D for ; Sat, 9 Mar 2019 07:40:28 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1551822838.0038f90a942f0856ae2533b26f709002a3ec80ae.ulm@gentoo> Subject: [gentoo-commits] proj/pms:master commit in: / X-VCS-Repository: proj/pms X-VCS-Files: ebuild-functions.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 0038f90a942f0856ae2533b26f709002a3ec80ae X-VCS-Branch: master Date: Sat, 9 Mar 2019 07:40:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 11eb2047-d3af-4f8d-afa8-7cf2ad776941 X-Archives-Hash: 732de6134e37510d7fe62145b64d3a41 commit: 0038f90a942f0856ae2533b26f709002a3ec80ae Author: Ulrich Müller gentoo org> AuthorDate: Tue Mar 5 21:53:58 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Tue Mar 5 21:53:58 2019 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=0038f90a ebuild-functions.tex: S to WORKDIR fallback is conditional for src_test. Arguably, section 9.1.1 "Initial working directories" applies also to src_test, even if section 9.1.8 "src_test" doesn't refer back to 9.1.1. In src_test, a fallback from S to WORKDIR could only happen for an ebuild that: - Has no files in A to be unpacked. - Doesn't define any of the unpack, prepare, configure, compile or install phases (otherwise it would die in one of these phases). Since that scenario is very unlikely, fix the wording in section 9.1.8 retroactively for EAPI 4 and later. Note: Implementations also differ about this: portage will always fall back, while for pkgcore it is a conditional error. Closes: https://bugs.gentoo.org/652050 Signed-off-by: Ulrich Müller gentoo.org> ebuild-functions.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ebuild-functions.tex b/ebuild-functions.tex index a4547fa..5c675ab 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -38,9 +38,9 @@ fallback to \t{WORKDIR} is used: \begin{compactitem} \item The \t{A} variable contains no items. \item The phase function in question is not in \t{DEFINED_PHASES}. -\item None of the phase functions \t{unpack}, \t{prepare}, \t{configure}, \t{compile} or \t{install}, - if supported by the EAPI in question and occurring prior to the phase about to be executed, are - in \t{DEFINED_PHASES}. +\item None of the phase functions \t{unpack}, \t{prepare}, \t{configure}, \t{compile}, \t{test} or + \t{install}, if supported by the EAPI in question and occurring prior to the phase about to be + executed, are in \t{DEFINED_PHASES}. \end{compactitem} \ChangeWhenAddingAnEAPI{7} @@ -277,7 +277,9 @@ src_compile() { The \t{src_test} function runs unit tests for the newly built but not yet installed package as provided. -The initial working directory must be \t{S} if that exists, falling back to \t{WORKDIR} otherwise. +The initial working directory is \t{S}, with an error or fallback to \t{WORKDIR} as discussed in +section~\ref{sec:s-to-workdir-fallback}. + The default implementation used when the ebuild lacks the \t{src_test} function must, if tests are enabled, run \t{emake check} if and only if such a target is available, or if not run \t{emake test} if and only if such a target is available. In both cases, if \t{emake} returns