From: "Ulrich Müller" <ulm@gentoo.org>
To: <gentoo-pms@lists.gentoo.org>
Subject: [gentoo-pms] [PATCH] ebuild-functions.tex: S to WORKDIR fallback is conditional for src_test.
Date: Tue, 5 Mar 2019 22:53:58 +0100 [thread overview]
Message-ID: <w6gbm2pasw9.fsf@kph.uni-mainz.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 2382 bytes --]
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 <ulm@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
--
2.19.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
reply other threads:[~2019-03-05 21:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=w6gbm2pasw9.fsf@kph.uni-mainz.de \
--to=ulm@gentoo.org \
--cc=gentoo-pms@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox