Gentoo Archives: gentoo-pms

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] [PATCH 1/3] dependencies: Permit {,B}DEPEND in source-initiated pkg_setup
Date: Fri, 05 Oct 2018 11:58:50
Message-Id: w6gh8i01u6q.fsf@kph.uni-mainz.de
In Reply to: [gentoo-pms] [PATCH 1/3] dependencies: Permit {,B}DEPEND in source-initiated pkg_setup by "Michał Górny"
1 >>>>> On Thu, 04 Oct 2018, Michał Górny wrote:
2
3 > Account for build dependencies being satisfied in pkg_setup, when
4 > executed as part of source build, in order to match the realistic
5 > implementation and widespread use in Gentoo. This changes pkg_setup
6 > from the previous state of no dependencies being guaranteed.
7
8 > Firstly, this matches the standard package manager implementation
9 > better. Since pkg_setup is executed as part of the sequence of
10 > successive phases comprising a source build, it is natural that build
11 > dependencies are installed already when it's executed, and not between
12 > pkg_setup and src_unpack.
13
14 > Secondly, it accounts for widespread use of pkg_setup to determine
15 > installed dependencies in order to set the build environment
16 > appropriately. This is a case e.g. with python-any-r1 or llvm eclasses,
17 > which query installed packages in order to determine the Python or LLVM
18 > version to use, appropriately. This behavior can't be changed without
19 > major changes to a large number of ebuilds, and without making ebuild
20 > development harder.
21
22 > Technically, we could extend the same rule to RDEPEND being satisfied
23 > when package is going to be installed. However, this would restrict
24 > the flexibility of parallel builds. With regard to the current rules,
25 > the package manager can start building package from sources before all
26 > of its runtime dependencies are installed. The unclear benefit
27 > of having RDEPEND satisfied in pkg_setup does not seem to justify losing
28 > this possibility.
29
30 > Signed-off-by: Michał Górny <mgorny@g.o>
31 > ---
32 > dependencies.tex | 12 ++++++++----
33 > 1 file changed, 8 insertions(+), 4 deletions(-)
34
35 > diff --git a/dependencies.tex b/dependencies.tex
36 > index deb5d9c..65ec074 100644
37 > --- a/dependencies.tex
38 > +++ b/dependencies.tex
39 > @@ -11,9 +11,12 @@
40 > \multicolumn{1}{c}{\textbf{Phase function}} &
41 > \multicolumn{1}{c}{\textbf{Satisfied dependency classes}} \\
42 > \midrule
43 > - \t{pkg_pretend}, \t{pkg_setup}, \t{pkg_info}, \t{pkg_nofetch} &
44 > + \t{pkg_pretend}, \t{pkg_info}, \t{pkg_nofetch} &
45 > None (ebuilds can rely only on the packages in the system~set) \\
46 > \addlinespace
47 > + \t{pkg_setup} & same as \t{src_unpack} if executed as part of source build,
48
49 s/same/Same/ for consistency with the previous row (and with other tables).
50
51 > + same as \t{pkg_pretend} otherwise \\
52 > + \addlinespace
53 > \t{src_unpack}, \t{src_prepare}, \t{src_configure}, \t{src_compile}, \t{src_test},
54 > \t{src_install} & \t{DEPEND}, \t{BDEPEND} \\
55 > \addlinespace
56 > @@ -44,9 +47,10 @@
57 > There are three classes of dependencies supported by ebuilds:
58
59 > \begin{compactitem}
60 > -\item Build dependencies (\t{DEPEND}). These must be installed and usable before any of
61 > - the ebuild \t{src_*} phase functions is executed. These may not be installed at all
62 > - if a binary package is being merged.
63 > +\item Build dependencies (\t{DEPEND}). These must be installed and usable before the \t{pkg_setup}
64 > + phase function is executed as a part of source build and throughout all \t{src_*} phase
65 > + functions executed as part of that build. These may not be installed at all if a binary package
66 > + is being merged.
67 > \item Runtime dependencies (\t{RDEPEND}). These must be installed and usable before
68 > the results of an ebuild merging are treated as usable.
69 > \item Post dependencies (\t{PDEPEND}). These must be installed at some point before
70 > --
71 > 2.19.0
72
73 Ack.
74
75 With respect to RDEPEND in pkg_setup, also note the following discussion
76 in 2011 (where you came to the same conclusion for another reason):
77 https://archives.gentoo.org/gentoo-pms/message/ae52de8d7aae179166794a3bac873a68
78
79 Ulrich

Attachments

File name MIME type
signature.asc application/pgp-signature