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 10FD013835B for ; Mon, 24 May 2021 19:39:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40B1AE081A; Mon, 24 May 2021 19:39:37 +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 2A214E081A for ; Mon, 24 May 2021 19:39:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 3F7AB340A03 for ; Mon, 24 May 2021 19:39:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7EC3679D for ; Mon, 24 May 2021 19:39:33 +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: <1621883979.11266ab01b368d08fb5a5aa07c4c6fe69c9d260e.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-8 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex ebuild-functions.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 11266ab01b368d08fb5a5aa07c4c6fe69c9d260e X-VCS-Branch: eapi-8 Date: Mon, 24 May 2021 19:39:33 +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: 55a37a29-7225-4818-8ba8-cf1e5ad2f868 X-Archives-Hash: 7c3189331548f6f95861745a60974025 commit: 11266ab01b368d08fb5a5aa07c4c6fe69c9d260e Author: Ulrich Müller gentoo org> AuthorDate: Sun May 16 19:06:02 2021 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Mon May 24 19:19:39 2021 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=11266ab0 EAPI 8: Default src_prepare doesn't accept options in PATCHES Bug: https://bugs.gentoo.org/752486 Signed-off-by: Ulrich Müller gentoo.org> eapi-differences.tex | 3 ++- ebuild-functions.tex | 21 ++++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 842e09f..aeddb6e 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -124,7 +124,7 @@ Working directory in \t{pkg_*} phases & \compactfeatureref{phase-function-dir} & * & Yes & Yes & Yes & Yes \\ \t{src_prepare} style & \compactfeatureref{src-prepare} & - * & no-op & 6 & 6 & 6 \\ + * & no-op & 6 & 6 & 8 \\ \t{src_configure} & \compactfeatureref{src-configure} & * & Yes & Yes & Yes & Yes \\ @@ -498,6 +498,7 @@ EAPI 8 is EAPI 7 with the following changes: \item Selective fetch/mirror restriction, \featureref{uri-restrict}. \item \t{IDEPEND}, \featureref{idepend}. \item Empty working directory in \t{pkg_*} phase functions, \featureref{phase-function-dir}. +\item Different \t{src_prepare} implementation, \featureref{src-prepare}. \end{compactitem} \ChangeWhenAddingAnEAPI{8} diff --git a/ebuild-functions.tex b/ebuild-functions.tex index b224e0b..d95d8ce 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -142,9 +142,9 @@ post-unpack source preparation. 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}. -For EAPIs listed in table~\ref{tab:src-prepare-table} as using format~6, the default +For EAPIs listed in table~\ref{tab:src-prepare-table} as using format 6 or~8, the default implementation used when the ebuild lacks the \t{src_prepare} function shall behave as in -listing~\ref{lst:src-prepare-6}. +listing~\ref{lst:src-prepare-6} or listing~\ref{lst:src-prepare-8}, respectively. For other EAPIs supporting \t{src_prepare}, the default implementation used when the ebuild lacks the \t{src_prepare} function is a no-op. @@ -160,7 +160,8 @@ the \t{src_prepare} function is a no-op. \midrule 0, 1 & No & Not applicable \\ 2, 3, 4, 5 & Yes & no-op \\ - 6, 7, 8 & Yes & 6 \\ + 6, 7 & Yes & 6 \\ + 8 & Yes & 8 \\ \bottomrule \end{tabular} \end{centertable} @@ -179,6 +180,20 @@ src_prepare() { \end{verbatim} \end{listing} +\begin{listing}[H] +\caption{\t{src_prepare}, format~8} \label{lst:src-prepare-8} +\begin{verbatim} +src_prepare() { + if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then + [[ -n ${PATCHES[@]} ]] && eapply -- "${PATCHES[@]}" + else + [[ -n ${PATCHES} ]] && eapply -- ${PATCHES} + fi + eapply_user +} +\end{verbatim} +\end{listing} + \subsection{src_configure} \featurelabel{src-configure} The \t{src_configure} function is only called for EAPIs listed in