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 7291C13800E for ; Sun, 12 Aug 2012 12:11:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67A8EE0508; Sun, 12 Aug 2012 12:11:27 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 26507E0508 for ; Sun, 12 Aug 2012 12:11:27 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 680541B4013 for ; Sun, 12 Aug 2012 12:11:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 024A5E5442 for ; Sun, 12 Aug 2012 12:11:24 +0000 (UTC) From: "Ulrich Mueller" 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 Mueller" Message-ID: <1344773755.2921080e5b4f67ae55d2f80f8fea2b8d47ced831.ulm@gentoo> Subject: [gentoo-commits] proj/pms:eapi-5 commit in: / X-VCS-Repository: proj/pms X-VCS-Files: eapi-differences.tex profiles.tex X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Mueller X-VCS-Revision: 2921080e5b4f67ae55d2f80f8fea2b8d47ced831 X-VCS-Branch: eapi-5 Date: Sun, 12 Aug 2012 12:11:24 +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: 6838ca28-f186-4a54-ba13-2d68fe56eb4e X-Archives-Hash: c3cacafc6a515e55d6081a49983a904a commit: 2921080e5b4f67ae55d2f80f8fea2b8d47ced831 Author: Andreas K. Huettel gentoo org> AuthorDate: Sat Jul 21 20:55:25 2012 +0000 Commit: Ulrich Mueller gentoo org> CommitDate: Sun Aug 12 12:15:55 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=commit;h=2921080e EAPI 5 has stable use forcing and masking. --- eapi-differences.tex | 5 ++++ profiles.tex | 65 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/eapi-differences.tex b/eapi-differences.tex index 2b2ae80..748e2b4 100644 --- a/eapi-differences.tex +++ b/eapi-differences.tex @@ -40,6 +40,9 @@ \bottomrule \endlastfoot +Stable use masking/forcing & \compactfeatureref{stablemask} & + No & No & No & No & No & Yes \\ + Profile \t{IUSE} injection & \compactfeatureref{profile-iuse-injection} & No & No & No & No & No & Yes \\ @@ -269,6 +272,8 @@ EAPI 4 is EAPI 3 with the following changes: EAPI 5 is EAPI 4 with the following changes: \begin{compactitem} +\item \t{package.use.stable.mask} and \t{package.use.stable.force} can be used to restrict + use flag combinations, \featureref{stablemask} \item \t{econf} adds \t{-{}-disable-silent-rules}, \featureref{econf-options}. \item Slot operator dependencies, \featureref{slot-operator-deps}. \item \t{src\_test} supports parallel tests, \featureref{parallel-tests}. diff --git a/profiles.tex b/profiles.tex index 8246431..8fb7674 100644 --- a/profiles.tex +++ b/profiles.tex @@ -108,14 +108,43 @@ the forms defined by the directory's EAPI. \subsection{USE masking and forcing} \label{sec:use-masking} -This section covers the four files \t{use.mask}, \t{use.force}, \t{package.use.mask} and -\t{package.use.force}. They are described together because they interact in a non-trivial manner. +This section covers the eight files \t{use.mask}, \t{use.force}, \t{use.stable.mask}, +\t{use.stable.force}, \t{package.use.mask}, \t{package.use.force}, \t{package.use.stable.mask}, +and \t{package.use.stable.force}. They are described together because they interact in a non-trivial +manner. Simply speaking, \t{use.mask} and \t{use.force} are used to say that a given USE flag must never or always, respectively, be enabled when using this profile. \t{package.use.mask} and -\t{package.use.force} do the same thing on a per-package, or per-version, basis. The precise manner -in which they interact is less simple, and is best described in terms of the algorithm used to -determine whether a flag is masked for a given package version. This is described in Algorithm~\ref{alg:use-masking}. +\t{package.use.force} do the same thing on a per-package, or per-version, basis. + +\featurelabel{stablemask} +In profile directories with an EAPI supporting stable masking, as listed in +table~\ref{tab:profile-stablemask}, the same is true for \t{use.stable.mask}, \t{use.stable.force}, +\t{package.use.stable.mask} and \t{package.use.stable.force}. These files, however, only act on +packages that are merged due to a stable keyword in the sense of subsection~\ref{sec:keywords}. +Thus, these files can be used to restrict the feature set deemed stable in a package. + +\ChangeWhenAddingAnEAPI{5} +\begin{centertable}{Profile directory support for masking/forcing use flags in stable +versions only}\label{tab:profile-stablemask} + \begin{tabular}{ l l l } + \toprule + \multicolumn{1}{c}{\textbf{EAPI}} & + \multicolumn{1}{c}{\textbf{Supports masking/forcing use flags in stable versions?}} \\ + \midrule + \t{0} & No \\ + \t{1} & No \\ + \t{2} & No \\ + \t{3} & No \\ + \t{4} & No \\ + \t{5} & Yes \\ + \bottomrule + \end{tabular} +\end{centertable} + +The precise manner in which the eight files interact is less simple, and is best described in terms +of the algorithm used to determine whether a flag is masked for a given package version. This is +described in Algorithm~\ref{alg:use-masking}. \begin{algorithm} \caption{USE masking logic} \label{alg:use-masking} \begin{algorithmic}[1] @@ -126,6 +155,13 @@ determine whether a flag is masked for a given package version. This is describe \ELSIF{\t{use.mask} contains \i{-flag}} \STATE let masked = false \ENDIF + \IF{stable keyword in use} + \IF{\t{use.stable.mask} contains \i{flag}} + \STATE let masked = true + \ELSIF{\t{use.stable.mask} contains \i{-flag}} + \STATE let masked = false + \ENDIF + \ENDIF \FOR{each $line$ in package.use.mask, in order, for which the spec matches $package$} \IF{$line$ contains \i{flag}} \STATE let masked = true @@ -133,12 +169,27 @@ determine whether a flag is masked for a given package version. This is describe \STATE let masked = false \ENDIF \ENDFOR + \IF{stable keyword in use} + \FOR{each $line$ in package.use.stable.mask, in order, for which the spec matches $package$} + \IF{$line$ contains \i{flag}} + \STATE let masked = true + \ELSIF{$line$ contains \i{-flag}} + \STATE let masked = false + \ENDIF + \ENDFOR + \ENDIF \ENDFOR \end{algorithmic} \end{algorithm} -The logic for \t{use.force} and \t{package.use.force} is identical. If a flag is both masked and -forced, the mask is considered to take precedence. +Stable restrictions (``stable keyword in use'' in Algorithm~\ref{alg:use-masking}) are applied +exactly if replacing in \t{KEYWORDS} all stable keywords by the corresponding tilde prefixed +keywords (see subsection~\ref{sec:keywords}) would result in the package installation being +prevented due to the \t{KEYWORDS} setting. + +The logic for \t{use.force}, \t{use.stable. force}, \t{package.use.force}, and +\t{package.use.stable.force} is identical. If a flag is both masked and forced, the mask is +considered to take precedence. \t{USE\_EXPAND} values may be forced or masked by using \t{expand\_name\_value}.