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 2D90D138334 for ; Sun, 28 Oct 2018 18:12:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C201DE0A4A; Sun, 28 Oct 2018 18:12:04 +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 8EE66E0A4A for ; Sun, 28 Oct 2018 18:12:04 +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 9C859335C39 for ; Sun, 28 Oct 2018 18:12:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6CD82447 for ; Sun, 28 Oct 2018 18:12:00 +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: <1540750104.ab9099c3e51badb8fe81dc8b37b7f41ee74257fb.ulm@gentoo> Subject: [gentoo-commits] proj/pms:master commit in: / X-VCS-Repository: proj/pms X-VCS-Files: dependencies.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: ab9099c3e51badb8fe81dc8b37b7f41ee74257fb X-VCS-Branch: master Date: Sun, 28 Oct 2018 18:12:00 +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: 6dff47d7-1137-4f18-81a3-c3c65f40f1dc X-Archives-Hash: 241f4c6adf58ff1d8c0196da99eb806c commit: ab9099c3e51badb8fe81dc8b37b7f41ee74257fb Author: Michał Górny gentoo org> AuthorDate: Thu Oct 4 17:13:37 2018 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Oct 28 18:08:24 2018 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=ab9099c3 dependencies: Permit {,B}DEPEND in source-initiated pkg_setup Account for build dependencies being satisfied in pkg_setup, when executed as part of source build, in order to match the realistic implementation and widespread use in Gentoo. This changes pkg_setup from the previous state of no dependencies being guaranteed. Firstly, this matches the standard package manager implementation better. Since pkg_setup is executed as part of the sequence of successive phases comprising a source build, it is natural that build dependencies are installed already when it's executed, and not between pkg_setup and src_unpack. Secondly, it accounts for widespread use of pkg_setup to determine installed dependencies in order to set the build environment appropriately. This is a case e.g. with python-any-r1 or llvm eclasses, which query installed packages in order to determine the Python or LLVM version to use, appropriately. This behavior can't be changed without major changes to a large number of ebuilds, and without making ebuild development harder. Technically, we could extend the same rule to RDEPEND being satisfied when package is going to be installed. However, this would restrict the flexibility of parallel builds. With regard to the current rules, the package manager can start building package from sources before all of its runtime dependencies are installed. The unclear benefit of having RDEPEND satisfied in pkg_setup does not seem to justify losing this possibility. Signed-off-by: Michał Górny gentoo.org> Signed-off-by: Ulrich Müller gentoo.org> dependencies.tex | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dependencies.tex b/dependencies.tex index deb5d9c..9675d9e 100644 --- a/dependencies.tex +++ b/dependencies.tex @@ -11,9 +11,12 @@ \multicolumn{1}{c}{\textbf{Phase function}} & \multicolumn{1}{c}{\textbf{Satisfied dependency classes}} \\ \midrule - \t{pkg_pretend}, \t{pkg_setup}, \t{pkg_info}, \t{pkg_nofetch} & + \t{pkg_pretend}, \t{pkg_info}, \t{pkg_nofetch} & None (ebuilds can rely only on the packages in the system~set) \\ \addlinespace + \t{pkg_setup} & Same as \t{src_unpack} if executed as part of source build, + same as \t{pkg_pretend} otherwise \\ + \addlinespace \t{src_unpack}, \t{src_prepare}, \t{src_configure}, \t{src_compile}, \t{src_test}, \t{src_install} & \t{DEPEND}, \t{BDEPEND} \\ \addlinespace @@ -44,9 +47,10 @@ There are three classes of dependencies supported by ebuilds: \begin{compactitem} -\item Build dependencies (\t{DEPEND}). These must be installed and usable before any of - the ebuild \t{src_*} phase functions is executed. These may not be installed at all - if a binary package is being merged. +\item Build dependencies (\t{DEPEND}). These must be installed and usable before the \t{pkg_setup} + phase function is executed as a part of source build and throughout all \t{src_*} phase + functions executed as part of that build. These may not be installed at all if a binary package + is being merged. \item Runtime dependencies (\t{RDEPEND}). These must be installed and usable before the results of an ebuild merging are treated as usable. \item Post dependencies (\t{PDEPEND}). These must be installed at some point before