From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1367469-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9BA4E15808C for <garchives@archives.gentoo.org>; Mon, 14 Feb 2022 07:29:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A92A0E0871; Mon, 14 Feb 2022 07:29:50 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83D22E0871 for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 07:29:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B66B03431C4 for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 07:29:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0C0D92F0 for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 07:29:46 +0000 (UTC) From: "Ulrich Müller" <ulm@gentoo.org> 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" <ulm@gentoo.org> Message-ID: <1644769514.2be267efa07e60e3ec5d0ef55c66778ef20362ff.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-9 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: ebuild-env-invariancy.tex ebuild-env-state.tex ebuild-environment.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 2be267efa07e60e3ec5d0ef55c66778ef20362ff X-VCS-Branch: eapi-9 Date: Mon, 14 Feb 2022 07:29:46 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0c66c7f9-636b-4cb2-b2cc-8b7a8a30c093 X-Archives-Hash: 619557691fbd34520e0a931cbf786548 commit: 2be267efa07e60e3ec5d0ef55c66778ef20362ff Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sun Feb 13 16:25:14 2022 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sun Feb 13 16:25:14 2022 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=2be267ef ebuild-environment.tex: Consolidate source files These small sections need not be in their own file. No change of wording. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ebuild-env-invariancy.tex | 39 ----------------------- ebuild-env-state.tex | 63 ------------------------------------- ebuild-environment.tex | 79 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 77 insertions(+), 104 deletions(-) diff --git a/ebuild-env-invariancy.tex b/ebuild-env-invariancy.tex deleted file mode 100644 index 9484103..0000000 --- a/ebuild-env-invariancy.tex +++ /dev/null @@ -1,39 +0,0 @@ -\section{The State of the System Between Functions} - -For the sake of this section: -\nobreakpar -\begin{compactitem} -\item Variancy is any package manager action that modifies either - \t{ROOT} or \t{/} in any way that isn't merely a simple addition of - something that doesn't alter other packages. This includes any - non-default call to any \t{pkg} phase function except \t{pkg_setup}, - a merge of any package or an unmerge of any package. -\item As an exception, changes to \t{DISTDIR} do not count as variancy. -\item The \t{pkg_setup} function may be assumed not to introduce variancy. - Thus, ebuilds must not perform variant actions in this phase. -\end{compactitem} - -The following exclusivity and invariancy requirements are mandated: -\nobreakpar -\begin{compactitem} -\item No variancy shall be introduced at any point between a package's - \t{pkg_setup} being started up to the point that that package is - merged, except for any variancy introduced by that package. -\item There must be no variancy between a package's \t{pkg_setup} and - a package's \t{pkg_postinst}, except for any variancy introduced - by that package. -\item Any non-default \t{pkg} phase function must be run exclusively. -\item Each phase function must be called at most once during the build - process for any given package. -\end{compactitem} - -% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "pms" -%%% LaTeX-indent-level: 4 -%%% LaTeX-item-indent: 0 -%%% TeX-brace-indent-level: 4 -%%% fill-column: 100 -%%% End: diff --git a/ebuild-env-state.tex b/ebuild-env-state.tex deleted file mode 100644 index a998660..0000000 --- a/ebuild-env-state.tex +++ /dev/null @@ -1,63 +0,0 @@ -\section{The State of Variables Between Functions} -\label{sec:ebuild-env-state} - -Exported and default scope variables are saved between functions. A non-local variable set in a -function earlier in the call sequence must have its value preserved for later functions, including -functions executed as part of a later uninstall. - -\note{\t{pkg_pretend} is \emph{not} part of the normal call sequence, and does not take part in -environment saving.} - -Variables that were exported must remain exported in later functions; variables with default -visibility may retain default visibility or be exported. Variables with special meanings to the -package manager are excluded from this rule. - -Global variables must only contain invariant values (see~\ref{sec:metadata-invariance}). If a global -variable's value is invariant, it may have the value that would be generated at any given point -in the build sequence. - -This is demonstrated by code listing~\ref{lst:env-saving}. - -\begin{listing} -\caption{Environment state between functions} \label{lst:env-saving} -\begin{verbatim} -GLOBAL_VARIABLE="a" - -src_compile() -{ - GLOBAL_VARIABLE="b" - DEFAULT_VARIABLE="c" - export EXPORTED_VARIABLE="d" - local LOCAL_VARIABLE="e" -} - -src_install(){ - [[ ${GLOBAL_VARIABLE} == "a" ]] \ - || [[ ${GLOBAL_VARIABLE} == "b" ]] \ - || die "broken env saving for globals" - - [[ ${DEFAULT_VARIABLE} == "c" ]] \ - || die "broken env saving for default" - - [[ ${EXPORTED_VARIABLE} == "d" ]] \ - || die "broken env saving for exported" - - [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \ - || die "broken env saving for exported" - - [[ -z ${LOCAL_VARIABLE} ]] \ - || die "broken env saving for locals" -} -\end{verbatim} -\end{listing} - -% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "pms" -%%% LaTeX-indent-level: 4 -%%% LaTeX-item-indent: 0 -%%% TeX-brace-indent-level: 4 -%%% fill-column: 100 -%%% End: diff --git a/ebuild-environment.tex b/ebuild-environment.tex index 82c036c..b9f3622 100644 --- a/ebuild-environment.tex +++ b/ebuild-environment.tex @@ -2,9 +2,84 @@ \input{ebuild-env-vars.tex} -\input{ebuild-env-state.tex} +\section{The State of Variables Between Functions} +\label{sec:ebuild-env-state} -\input{ebuild-env-invariancy.tex} +Exported and default scope variables are saved between functions. A non-local variable set in a +function earlier in the call sequence must have its value preserved for later functions, including +functions executed as part of a later uninstall. + +\note{\t{pkg_pretend} is \emph{not} part of the normal call sequence, and does not take part in +environment saving.} + +Variables that were exported must remain exported in later functions; variables with default +visibility may retain default visibility or be exported. Variables with special meanings to the +package manager are excluded from this rule. + +Global variables must only contain invariant values (see~\ref{sec:metadata-invariance}). If a global +variable's value is invariant, it may have the value that would be generated at any given point +in the build sequence. + +This is demonstrated by code listing~\ref{lst:env-saving}. + +\begin{listing} +\caption{Environment state between functions} \label{lst:env-saving} +\begin{verbatim} +GLOBAL_VARIABLE="a" + +src_compile() +{ + GLOBAL_VARIABLE="b" + DEFAULT_VARIABLE="c" + export EXPORTED_VARIABLE="d" + local LOCAL_VARIABLE="e" +} + +src_install(){ + [[ ${GLOBAL_VARIABLE} == "a" ]] \ + || [[ ${GLOBAL_VARIABLE} == "b" ]] \ + || die "broken env saving for globals" + + [[ ${DEFAULT_VARIABLE} == "c" ]] \ + || die "broken env saving for default" + + [[ ${EXPORTED_VARIABLE} == "d" ]] \ + || die "broken env saving for exported" + + [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \ + || die "broken env saving for exported" + + [[ -z ${LOCAL_VARIABLE} ]] \ + || die "broken env saving for locals" +} +\end{verbatim} +\end{listing} + +\section{The State of the System Between Functions} + +For the sake of this section: +\nobreakpar +\begin{compactitem} +\item Variancy is any package manager action that modifies either \t{ROOT} or \t{/} in any way that + isn't merely a simple addition of something that doesn't alter other packages. This includes + any non-default call to any \t{pkg} phase function except \t{pkg_setup}, a merge of any package + or an unmerge of any package. +\item As an exception, changes to \t{DISTDIR} do not count as variancy. +\item The \t{pkg_setup} function may be assumed not to introduce variancy. Thus, ebuilds must not + perform variant actions in this phase. +\end{compactitem} + +The following exclusivity and invariancy requirements are mandated: +\nobreakpar +\begin{compactitem} +\item No variancy shall be introduced at any point between a package's \t{pkg_setup} being started + up to the point that that package is merged, except for any variancy introduced by that package. +\item There must be no variancy between a package's \t{pkg_setup} and a package's \t{pkg_postinst}, + except for any variancy introduced by that package. +\item Any non-default \t{pkg} phase function must be run exclusively. +\item Each phase function must be called at most once during the build process for any given + package. +\end{compactitem} % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1367260-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5CA9215808B for <garchives@archives.gentoo.org>; Sun, 13 Feb 2022 16:26:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5B03E08A0; Sun, 13 Feb 2022 16:26:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7D559E08A0 for <gentoo-commits@lists.gentoo.org>; Sun, 13 Feb 2022 16:26:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A80C7342CB4 for <gentoo-commits@lists.gentoo.org>; Sun, 13 Feb 2022 16:26:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 29D6A1F1 for <gentoo-commits@lists.gentoo.org>; Sun, 13 Feb 2022 16:26:11 +0000 (UTC) From: "Ulrich Müller" <ulm@gentoo.org> 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" <ulm@gentoo.org> Message-ID: <1644769514.2be267efa07e60e3ec5d0ef55c66778ef20362ff.ulm@gentoo> Subject: [gentoo-commits] proj/pms:master commit in: / X-VCS-Repository: proj/pms X-VCS-Files: ebuild-env-invariancy.tex ebuild-env-state.tex ebuild-environment.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 2be267efa07e60e3ec5d0ef55c66778ef20362ff X-VCS-Branch: master Date: Sun, 13 Feb 2022 16:26:11 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 84c819cd-55d6-4e8a-abae-c5b5f6436d84 X-Archives-Hash: 0d8e59f8d15a516d930dd03d8e718712 Message-ID: <20220213162611.4BNm0Q7m2BGjOsHNeIbfU1dipmEdio4NHKY3bjJJtDM@z> commit: 2be267efa07e60e3ec5d0ef55c66778ef20362ff Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sun Feb 13 16:25:14 2022 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sun Feb 13 16:25:14 2022 +0000 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=2be267ef ebuild-environment.tex: Consolidate source files These small sections need not be in their own file. No change of wording. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ebuild-env-invariancy.tex | 39 ----------------------- ebuild-env-state.tex | 63 ------------------------------------- ebuild-environment.tex | 79 +++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 77 insertions(+), 104 deletions(-) diff --git a/ebuild-env-invariancy.tex b/ebuild-env-invariancy.tex deleted file mode 100644 index 9484103..0000000 --- a/ebuild-env-invariancy.tex +++ /dev/null @@ -1,39 +0,0 @@ -\section{The State of the System Between Functions} - -For the sake of this section: -\nobreakpar -\begin{compactitem} -\item Variancy is any package manager action that modifies either - \t{ROOT} or \t{/} in any way that isn't merely a simple addition of - something that doesn't alter other packages. This includes any - non-default call to any \t{pkg} phase function except \t{pkg_setup}, - a merge of any package or an unmerge of any package. -\item As an exception, changes to \t{DISTDIR} do not count as variancy. -\item The \t{pkg_setup} function may be assumed not to introduce variancy. - Thus, ebuilds must not perform variant actions in this phase. -\end{compactitem} - -The following exclusivity and invariancy requirements are mandated: -\nobreakpar -\begin{compactitem} -\item No variancy shall be introduced at any point between a package's - \t{pkg_setup} being started up to the point that that package is - merged, except for any variancy introduced by that package. -\item There must be no variancy between a package's \t{pkg_setup} and - a package's \t{pkg_postinst}, except for any variancy introduced - by that package. -\item Any non-default \t{pkg} phase function must be run exclusively. -\item Each phase function must be called at most once during the build - process for any given package. -\end{compactitem} - -% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "pms" -%%% LaTeX-indent-level: 4 -%%% LaTeX-item-indent: 0 -%%% TeX-brace-indent-level: 4 -%%% fill-column: 100 -%%% End: diff --git a/ebuild-env-state.tex b/ebuild-env-state.tex deleted file mode 100644 index a998660..0000000 --- a/ebuild-env-state.tex +++ /dev/null @@ -1,63 +0,0 @@ -\section{The State of Variables Between Functions} -\label{sec:ebuild-env-state} - -Exported and default scope variables are saved between functions. A non-local variable set in a -function earlier in the call sequence must have its value preserved for later functions, including -functions executed as part of a later uninstall. - -\note{\t{pkg_pretend} is \emph{not} part of the normal call sequence, and does not take part in -environment saving.} - -Variables that were exported must remain exported in later functions; variables with default -visibility may retain default visibility or be exported. Variables with special meanings to the -package manager are excluded from this rule. - -Global variables must only contain invariant values (see~\ref{sec:metadata-invariance}). If a global -variable's value is invariant, it may have the value that would be generated at any given point -in the build sequence. - -This is demonstrated by code listing~\ref{lst:env-saving}. - -\begin{listing} -\caption{Environment state between functions} \label{lst:env-saving} -\begin{verbatim} -GLOBAL_VARIABLE="a" - -src_compile() -{ - GLOBAL_VARIABLE="b" - DEFAULT_VARIABLE="c" - export EXPORTED_VARIABLE="d" - local LOCAL_VARIABLE="e" -} - -src_install(){ - [[ ${GLOBAL_VARIABLE} == "a" ]] \ - || [[ ${GLOBAL_VARIABLE} == "b" ]] \ - || die "broken env saving for globals" - - [[ ${DEFAULT_VARIABLE} == "c" ]] \ - || die "broken env saving for default" - - [[ ${EXPORTED_VARIABLE} == "d" ]] \ - || die "broken env saving for exported" - - [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \ - || die "broken env saving for exported" - - [[ -z ${LOCAL_VARIABLE} ]] \ - || die "broken env saving for locals" -} -\end{verbatim} -\end{listing} - -% vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en : - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "pms" -%%% LaTeX-indent-level: 4 -%%% LaTeX-item-indent: 0 -%%% TeX-brace-indent-level: 4 -%%% fill-column: 100 -%%% End: diff --git a/ebuild-environment.tex b/ebuild-environment.tex index 82c036c..b9f3622 100644 --- a/ebuild-environment.tex +++ b/ebuild-environment.tex @@ -2,9 +2,84 @@ \input{ebuild-env-vars.tex} -\input{ebuild-env-state.tex} +\section{The State of Variables Between Functions} +\label{sec:ebuild-env-state} -\input{ebuild-env-invariancy.tex} +Exported and default scope variables are saved between functions. A non-local variable set in a +function earlier in the call sequence must have its value preserved for later functions, including +functions executed as part of a later uninstall. + +\note{\t{pkg_pretend} is \emph{not} part of the normal call sequence, and does not take part in +environment saving.} + +Variables that were exported must remain exported in later functions; variables with default +visibility may retain default visibility or be exported. Variables with special meanings to the +package manager are excluded from this rule. + +Global variables must only contain invariant values (see~\ref{sec:metadata-invariance}). If a global +variable's value is invariant, it may have the value that would be generated at any given point +in the build sequence. + +This is demonstrated by code listing~\ref{lst:env-saving}. + +\begin{listing} +\caption{Environment state between functions} \label{lst:env-saving} +\begin{verbatim} +GLOBAL_VARIABLE="a" + +src_compile() +{ + GLOBAL_VARIABLE="b" + DEFAULT_VARIABLE="c" + export EXPORTED_VARIABLE="d" + local LOCAL_VARIABLE="e" +} + +src_install(){ + [[ ${GLOBAL_VARIABLE} == "a" ]] \ + || [[ ${GLOBAL_VARIABLE} == "b" ]] \ + || die "broken env saving for globals" + + [[ ${DEFAULT_VARIABLE} == "c" ]] \ + || die "broken env saving for default" + + [[ ${EXPORTED_VARIABLE} == "d" ]] \ + || die "broken env saving for exported" + + [[ $(printenv EXPORTED_VARIABLE ) == "d" ]] \ + || die "broken env saving for exported" + + [[ -z ${LOCAL_VARIABLE} ]] \ + || die "broken env saving for locals" +} +\end{verbatim} +\end{listing} + +\section{The State of the System Between Functions} + +For the sake of this section: +\nobreakpar +\begin{compactitem} +\item Variancy is any package manager action that modifies either \t{ROOT} or \t{/} in any way that + isn't merely a simple addition of something that doesn't alter other packages. This includes + any non-default call to any \t{pkg} phase function except \t{pkg_setup}, a merge of any package + or an unmerge of any package. +\item As an exception, changes to \t{DISTDIR} do not count as variancy. +\item The \t{pkg_setup} function may be assumed not to introduce variancy. Thus, ebuilds must not + perform variant actions in this phase. +\end{compactitem} + +The following exclusivity and invariancy requirements are mandated: +\nobreakpar +\begin{compactitem} +\item No variancy shall be introduced at any point between a package's \t{pkg_setup} being started + up to the point that that package is merged, except for any variancy introduced by that package. +\item There must be no variancy between a package's \t{pkg_setup} and a package's \t{pkg_postinst}, + except for any variancy introduced by that package. +\item Any non-default \t{pkg} phase function must be run exclusively. +\item Each phase function must be called at most once during the build process for any given + package. +\end{compactitem} % vim: set filetype=tex fileencoding=utf8 et tw=100 spell spelllang=en :