From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 79AD81389F5 for ; Thu, 2 Apr 2015 16:11:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5BF38E0938; Thu, 2 Apr 2015 16:11:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D2279E0938 for ; Thu, 2 Apr 2015 16:11:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA68B3408EA for ; Thu, 2 Apr 2015 16:10:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 739691512D for ; Thu, 2 Apr 2015 16:10:48 +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: <1427990884.58377b7e4b7ee97a330dcaf2d31f1dbdc576dcb0.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-6 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: 58377b7e4b7ee97a330dcaf2d31f1dbdc576dcb0 X-VCS-Branch: eapi-6 Date: Thu, 2 Apr 2015 16:10:48 +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-Archives-Salt: e74096e0-78b9-40ae-9c61-18677c0087f8 X-Archives-Hash: 7b6f9dc51813c864ffd2b335f37aab3b commit: 58377b7e4b7ee97a330dcaf2d31f1dbdc576dcb0 Author: Ulrich Müller gentoo org> AuthorDate: Mon Mar 23 18:41:28 2015 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Thu Apr 2 16:08:04 2015 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=58377b7e EAPI 6 has a default src_prepare. See bug 463692. This adds support for the PATCHES array and for user patches. eapi-differences.tex | 4 ++++ ebuild-functions.tex | 36 +++++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 2fe534e..adebec1 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -92,6 +92,9 @@ Use dependencies & \compactfeatureref{use-deps} & \t{src\_prepare} & \compactfeatureref{src-prepare} & * & Yes & Yes & Yes & Yes \\ +\t{src\_prepare} style & \compactfeatureref{src-prepare} & + * & no-op & no-op & no-op & 6 \\ + \t{src\_configure} & \compactfeatureref{src-configure} & * & Yes & Yes & Yes & Yes \\ @@ -326,6 +329,7 @@ EAPI 6 is EAPI 5 with the following changes: \begin{compactitem} \item Profile \t{package*} and \t{use*} can be directories, \featureref{profile-file-dirs}. +\item Default \t{src\_prepare} no longer a no-op, \featureref{src-prepare-6}. \item Bash version is 4.2, \featureref{bash-version}. \item \t{failglob} is enabled in global scope, \featureref{failglob}. \item \t{einstall} banned, \featureref{banned-commands}. diff --git a/ebuild-functions.tex b/ebuild-functions.tex index ebd1b21..e7eb97b 100644 --- a/ebuild-functions.tex +++ b/ebuild-functions.tex @@ -121,24 +121,42 @@ src_unpack() { \label{sec:src-prepare-function} \featurelabel{src-prepare} The \t{src\_prepare} function is only called for EAPIs listed in -table~\ref{tab:src-prepare-table} as supporting it. - -The \t{src\_prepare} function can be used for post-unpack source preparation. The default -implementation does nothing. +table~\ref{tab:src-prepare-table} as supporting it. The \t{src\_prepare} function can be used for +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}. +\featurelabel{src-prepare-6} For EAPIs listed in table~\ref{tab:src-prepare-table} as using format +6, the default implementation used when the ebuild lacks the \t{src\_prepare} function shall behave +as: + +\begin{verbatim} +src_prepare() { + if declare -p PATCHES | grep -q "^declare -a "; then + [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}" + else + [[ -n ${PATCHES} ]] && eapply ${PATCHES} + fi + eapply_user +} +\end{verbatim} + +For other EAPIs supporting \t{src\_prepare}, the default implementation used when the ebuild lacks +the \t{src\_prepare} function is a no-op. + \ChangeWhenAddingAnEAPI{6} -\begin{centertable}{EAPIs supporting \t{src\_prepare}} +\begin{centertable}{\t{src\_prepare} support and behaviour for EAPIs} \label{tab:src-prepare-table} - \begin{tabular}{ l l } + \begin{tabular}{ l l l } \toprule \multicolumn{1}{c}{\textbf{EAPI}} & - \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} \\ + \multicolumn{1}{c}{\textbf{Supports \t{src\_prepare}?}} & + \multicolumn{1}{c}{\textbf{Format}} \\ \midrule - 0, 1 & No \\ - 2, 3, 4, 5, 6 & Yes \\ + 0, 1 & No & Not applicable \\ + 2, 3, 4, 5 & Yes & no-op \\ + 6 & Yes & 6 \\ \bottomrule \end{tabular} \end{centertable}