public inbox for gentoo-pms@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-pms@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-pms] [PATCH eapi8] EAPI 8 has install-time dependencies (IDEPEND)
Date: Sun, 22 Dec 2019 21:32:41 +0100	[thread overview]
Message-ID: <20191222203241.180616-1-mgorny@gentoo.org> (raw)

Bug: https://bugs.gentoo.org/660306
Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dependencies.tex     | 38 ++++++++++++++++++++++++--------------
 eapi-differences.tex |  4 ++++
 ebuild-env-vars.tex  |  7 ++++---
 ebuild-vars.tex      |  1 +
 eclasses.tex         |  8 ++++----
 metadata-cache.tex   |  2 ++
 6 files changed, 39 insertions(+), 21 deletions(-)

diff --git a/dependencies.tex b/dependencies.tex
index 40c932a..7924105 100644
--- a/dependencies.tex
+++ b/dependencies.tex
@@ -21,7 +21,7 @@
           \t{src_install} & \t{DEPEND}, \t{BDEPEND} \\
       \addlinespace
       \t{pkg_preinst}, \t{pkg_postinst}, \t{pkg_prerm}, \t{pkg_postrm} &
-          \t{RDEPEND} \\
+          \t{RDEPEND}, \t{IDEPEND} \\
       \addlinespace
       \t{pkg_config} & \t{RDEPEND}, \t{PDEPEND} \\
       \bottomrule
@@ -30,15 +30,16 @@
 
 \begin{centertable}{Summary of other interfaces related to dependency classes}
     \label{tab:dep-class-api}
-    \begin{tabular}{llll}
+    \begin{tabular}{lllll}
       \toprule
-                                & \t{BDEPEND}     & \t{DEPEND}         & \t{RDEPEND}, \t{PDEPEND} \\
+                                & \t{BDEPEND}, \t{IDEPEND} & \t{DEPEND}         & \t{RDEPEND},
+                                                                                  \t{PDEPEND}       \\
       \midrule
-      Binary compatible with    & \t{CBUILD}      & \t{CHOST}          & \t{CHOST}         \\
-      Base unprefixed path      & \t{/}           & \t{\$\{SYSROOT\}}  & \t{\$\{ROOT\}}    \\
-      Relevant offset-prefix    & \t{\$\{BROOT\}} & \t{\$\{EPREFIX\}}  & \t{\$\{EPREFIX\}} \\
-      Path combined with prefix & \t{\$\{BROOT\}} & \t{\$\{ESYSROOT\}} & \t{\$\{EROOT\}}   \\
-      PM query command option   & \t{-b}          & \t{-d}             & \t{-r}            \\
+      Binary compatible with    & \t{CBUILD}               & \t{CHOST}          & \t{CHOST}         \\
+      Base unprefixed path      & \t{/}                    & \t{\$\{SYSROOT\}}  & \t{\$\{ROOT\}}    \\
+      Relevant offset-prefix    & \t{\$\{BROOT\}}          & \t{\$\{EPREFIX\}}  & \t{\$\{EPREFIX\}} \\
+      Path combined with prefix & \t{\$\{BROOT\}}          & \t{\$\{ESYSROOT\}} & \t{\$\{EROOT\}}   \\
+      PM query command option   & \t{-b}                   & \t{-d}             & \t{-r}            \\
       \bottomrule
     \end{tabular}
 \end{centertable}
@@ -68,16 +69,24 @@ as supporting \t{BDEPEND}, the build dependencies are split into two subclasses:
     dependency.
 \end{compactitem}
 
+\featurelabel{idepend} Additionally, in EAPIs listed in table~\ref{tab:depend-table} as supporting
+\t{IDEPEND}, install-time dependencies can be specified. Those dependencies are binary compatible
+with the native build system (\t{CBUILD}). The~ebuild is allowed to call them in \t{pkg_preinst}
+and \t{pkg_postinst} phases. The ebuild may also call them in \t{pkg_prerm} and \t{pkg_postrm}
+but must not rely on them being available.
+
 \ChangeWhenAddingAnEAPI{8}
 \begin{centertable}{EAPIs supporting additional dependency types}
     \label{tab:depend-table}
-    \begin{tabular}{ll}
+    \begin{tabular}{lll}
       \toprule
       \multicolumn{1}{c}{\textbf{EAPI}} &
-      \multicolumn{1}{c}{\textbf{Supports \t{BDEPEND}?}} \\
+      \multicolumn{1}{c}{\textbf{Supports \t{BDEPEND}?}} &
+      \multicolumn{1}{c}{\textbf{Supports \t{IDEPEND}?}} \\
       \midrule
-      0, 1, 2, 3, 4, 5, 6 & No  \\
-      7, 8                & Yes \\
+      0, 1, 2, 3, 4, 5, 6 & No  & No  \\
+      7                   & Yes & No  \\
+      8                   & Yes & Yes \\
       \bottomrule
     \end{tabular}
 \end{centertable}
@@ -97,7 +106,7 @@ be surrounded on both sides by whitespace, except at the start and end of the st
 
 \begin{compactitem}
 \item A package dependency specification. Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND},
-    \t{PDEPEND}.
+    \t{IDEPEND}, \t{PDEPEND}.
 \item A URI, in the form \t{proto://host/path}. Permitted in \t{HOMEPAGE} and \t{SRC_URI}\@.
     In EAPIs listed in table~\ref{tab:uri-arrows-table} as supporting \t{SRC_URI} arrows, may
     optionally be followed by whitespace, then \t{->}, then whitespace, then a simple filename when
@@ -115,7 +124,8 @@ be surrounded on both sides by whitespace, except at the start and end of the st
     followed by an open parenthesis, followed by whitespace, followed by one or more
     of (a dependency item of any kind followed by whitespace), followed by a close parenthesis.
     More formally: \t{any-of} \t{::=} \t{'||' whitespace '(' whitespace (item whitespace)+ ')'}.
-    Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{PDEPEND}, \t{LICENSE}, \t{REQUIRED_USE}.
+    Permitted in \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{IDEPEND}, \t{PDEPEND}, \t{LICENSE},
+    \t{REQUIRED_USE}.
 \item An exactly-one-of group, which has the same format as the any-of group, but begins with the
     string \t{\textasciicircum\textasciicircum} instead. Permitted in \t{REQUIRED_USE}.
 \item \featurelabel{at-most-one-of} An at-most-one-of group, which has the same format as the
diff --git a/eapi-differences.tex b/eapi-differences.tex
index 59940b0..94816d4 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -83,6 +83,9 @@ Selective URI restrictions & \compactfeatureref{selective-uri-restrict} &
 \t{BDEPEND} & \compactfeatureref{bdepend} &
     No & No & No & Yes & Yes \\
 
+\t{IDEPEND} & \compactfeatureref{idepend} &
+    No & No & No & No & Yes \\
+
 \t{??\ ( )} groups & \compactfeatureref{at-most-one-of} &
     No & Yes & Yes & Yes & Yes \\
 
@@ -485,6 +488,7 @@ EAPI 8 is EAPI 7 with the following changes:
 
 \begin{compactitem}
 \item Selective fetch/mirror restriction, \featureref{selective-uri-restrict}.
+\item \t{IDEPEND}, \featureref{idepend}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{8}
diff --git a/ebuild-env-vars.tex b/ebuild-env-vars.tex
index 2370d9d..6065ff4 100644
--- a/ebuild-env-vars.tex
+++ b/ebuild-env-vars.tex
@@ -147,9 +147,10 @@ variable.
 \t{BROOT} &
     Ditto &
     No &
-    \featurelabel{broot} The absolute path to the root directory containing build dependencies
-    satisfied by \t{BDEPEND}, typically executable build tools. This includes any applicable offset
-    prefix. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as supporting \t{BROOT}.
+    \featurelabel{broot} The absolute path to the root directory containing build host dependencies
+    satisfied by \t{BDEPEND} and \t{IDEPEND}, typically executable build tools. This includes any
+    applicable offset prefix. Only for EAPIs listed in table~\ref{tab:offset-env-vars-table} as
+    supporting \t{BROOT}.
     \\
 \t{T} &
     All &
diff --git a/ebuild-vars.tex b/ebuild-vars.tex
index 12184a8..1e19d0d 100644
--- a/ebuild-vars.tex
+++ b/ebuild-vars.tex
@@ -86,6 +86,7 @@ Ebuilds may define any of the following variables:
     details.
 \item[PDEPEND] See chapter~\ref{ch:dependencies}.
 \item[BDEPEND] See chapter~\ref{ch:dependencies}.
+\item[IDEPEND] See chapter~\ref{ch:dependencies}.
 \end{description}
 
 \ChangeWhenAddingAnEAPI{8}
diff --git a/eclasses.tex b/eclasses.tex
index bf0007b..2ecdc66 100644
--- a/eclasses.tex
+++ b/eclasses.tex
@@ -34,10 +34,10 @@ The \t{inherit} command must also ensure that:
 
 \section{Eclass-defined Metadata Keys}
 
-The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND} and \t{PDEPEND} variables
-are handled specially when set by an eclass. They must be accumulated across eclasses, appending
-the value set by each eclass to the resulting value after the previous one is loaded. Then the
-eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this
+The \t{IUSE}, \t{REQUIRED_USE}, \t{DEPEND}, \t{BDEPEND}, \t{RDEPEND}, \t{IDEPEND} and \t{PDEPEND}
+variables are handled specially when set by an eclass. They must be accumulated across eclasses,
+appending the~value set by each eclass to the resulting value after the previous one is loaded. Then
+the eclass-defined value is appended to that defined by the ebuild. In the case of \t{RDEPEND}, this
 is done after the implicit \t{RDEPEND} rules in section~\ref{sec:rdepend-depend} are applied.
 
 \section{EXPORT_FUNCTIONS}
diff --git a/metadata-cache.tex b/metadata-cache.tex
index 33574c4..d69ecdd 100644
--- a/metadata-cache.tex
+++ b/metadata-cache.tex
@@ -36,6 +36,8 @@ order. Other lines may be present following these; their meanings are not define
     metadata; see table~\ref{tab:optional-vars-table}.
 \item Defined phases (\t{DEFINED_PHASES}). In some EAPIs, may optionally be blank, regardless of
     ebuild metadata; see table~\ref{tab:defined-phases-table}.
+\item Install-time dependencies (\t{IDEPEND}).
+    Blank in some EAPIs; see table~\ref{tab:depend-table}.
 \item Blank lines to pad the file to 22 lines long
 \end{compactenum}
 
-- 
2.24.1



             reply	other threads:[~2019-12-22 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-22 20:32 Michał Górny [this message]
2019-12-23  7:21 ` [gentoo-pms] [PATCH eapi8] EAPI 8 has install-time dependencies (IDEPEND) Ulrich Mueller
2019-12-23 13:20   ` Michał Górny

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=20191222203241.180616-1-mgorny@gentoo.org \
    --to=mgorny@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