From 3c37eba1c7459567d84ce1bcd5f8cff713b13d0e Mon Sep 17 00:00:00 2001 From: Christian Faulhammer Date: Mon, 20 Dec 2010 17:44:46 +0100 Subject: [PATCH] EAPI Cheat Sheet: Use the line breaking functionality of the url package --- eapi-cheatsheet.tex | 53 ++++++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex index fcdd6d8..d2d3aac 100644 --- a/eapi-cheatsheet.tex +++ b/eapi-cheatsheet.tex @@ -13,10 +13,10 @@ } \usepackage[orig,english]{isodate} \usepackage[scaled=.90]{helvet} -\newcommand{\code}[1]{\texttt{#1}} \newcommand{\version}{0.3} \newcommand{\featureref}[1]{\textsc{#1} on page~\pageref{feat:#1}} \renewcommand{\familydefault}{\sfdefault} +\DeclareUrlCommand\code{\urlstyle{tt}} \urlstyle{sf} \externaldocument{pms} @@ -83,7 +83,8 @@ nonetheless. not disabled explicitly by user configuration) with a \code{+} sign in front. See \featureref{iuse-defaults}. \item[Named slot dependencies] Dependencies can explicitly request - a specific slot by using the \code{dev-libs/foo:\emph{SLOT\_name}} syntax. See + a specific slot by using the + \code{dev-libs/foo:}\emph{\texttt{SLOT\_name}} syntax. See \featureref{slot-deps}. \end{description} \section{EAPI 2 (2008-09-25)} @@ -91,13 +92,13 @@ nonetheless. \subsection{Additions/Changes} \label{sec:cs:eapi2-additions} \begin{description} - \item[\code{SRC\_URI} arrows] Allows redirection of upstream file - naming scheme. By using \code{SRC\_URI="http://some/url -> foo"} + \item[\code{SRC_URI} arrows] Allows redirection of upstream file + naming scheme. By using \code{SRC_URI="http://some/url -> foo"} the file is saved as \code{foo} in DISTDIR. See \featureref{src-uri-arrows}. \item[USE dependencies] Dependencies can specify USE flag requirements on their target, removing the need for - \code{built\_with\_use} checks. A more powerful syntax that does + \code{built_with_use} checks. A more powerful syntax that does not require the flag to be in IUSE is in EAPI 4. \begin{description} \item[{[opt]}] The flag must be enabled. @@ -118,20 +119,20 @@ nonetheless. be ignored by the package manager as long as the stated package is uninstalled later on. Two exclamation marks are a strong blocker and will always be respected. See \featureref{bang-strength}. - \item[\code{src\_configure, src\_prepare}] Both new phases provide + \item[\code{src_configure, src_prepare}] Both new phases provide finer granularity in the ebuild's structure. Configure calls - should be moved from \code{src\_compile} to \code{src\_configure}. + should be moved from \code{src_compile} to \code{src_configure}. Patching and similar preparation must now be done in - \code{src\_prepare}, not \code{src\_unpack}. See + \code{src_prepare}, not \code{src_unpack}. See \featureref{src-prepare} and \featureref{src-configure}. \item[Default phase functions] The default functions for the - phases \code{pkg\_nofetch}, \code{src\_unpack}, - \code{src\_prepare}, \code{src\_configure}, \code{src\_compile} - and \code{src\_test} can be called via - \code{default\_\emph{phasename}}, so duplicating the standard + phases \code{pkg_nofetch}, \code{src_unpack}, + \code{src_prepare}, \code{src_configure}, \code{src_compile} + and \code{src_test} can be called via + \code{default_}\emph{\texttt{phasename}}, so duplicating the standard implementation is no longer necessary for small additions. The short-hand \code{default} function calls the current phase's - \code{default\_} function automatically, so any small additions + \code{default_} function automatically, so any small additions you need will not be accompanied by a complete reimplementation of the phase. See \featureref{default-phase-funcs} and \featureref{default-func}. @@ -149,7 +150,7 @@ nonetheless. \begin{description} \item[Support for \code{.xz}] Unpack of \code{.xz} and \code{.tar.xz} files is possible without any custom - \code{src\_unpack} functions. See \featureref{unpack-extensions}. + \code{src_unpack} functions. See \featureref{unpack-extensions}. \item[Offset prefix] Supporting installation on Prefix-enabled systems\footnote{\url{http://prefix.gentoo.org/}} will be easier with this EAPI. @@ -159,17 +160,17 @@ nonetheless. \subsection{Additions/Changes} \label{sec:cs:eapi4-additions} \begin{description} - \item[\code{pkg\_pretend}] Some useful checks (kernel options for + \item[\code{pkg_pretend}] Some useful checks (kernel options for example) can be placed in this new phase to inform the user early (when just pretending to emerge the package). Most checks should - usually be repeated in \code{pkg\_setup}. See + usually be repeated in \code{pkg_setup}. See \featureref{pkg-pretend}. - \item[\code{src\_install}] The \code{src\_install} phase is no + \item[\code{src_install}] The \code{src_install} phase is no longer empty but has a default now. This comes along with an accompanying \code{default} function. See \featureref{src-install-4}. - \item[\code{pkg\_info} on non-installed packages] The - \code{pkg\_info} phase can be called even for non-installed + \item[\code{pkg_info} on non-installed packages] The + \code{pkg_info} phase can be called even for non-installed packages. Be warned that dependencies might not have been installed at execution time. See \featureref{pkg-info}. \item[\code{econf} changes] The helper function now always @@ -181,10 +182,10 @@ nonetheless. specifies that flags not in IUSE should be treated as enabled; the latter, disabled. Cannot be used with USE\_EXPAND flags. This mimics parts of the behaviour of \code{-{}-missing} in - \code{built\_with\_use}. See \featureref{use-dep-defaults}. + \code{built_with_use}. See \featureref{use-dep-defaults}. \item[Controllable compression] All items in the \code{doc}, \code{info}, \code{man} subdirectories of \code{/usr/share/} may - be compressed on-disk after \code{src\_install}, except for + be compressed on-disk after \code{src_install}, except for \code{/usr/share/doc/\$\{PF\}/html}. \code{docompress path \dots} adds paths to the inclusion list for compression. \code{docompress -x path \dots} adds paths to the exclusion list. @@ -202,12 +203,12 @@ nonetheless. \featureref{nonfatal}. \item[\code{PROPERTIES}] Is mandatory for all package managers now to support interactive installs. - \item[\code{REPLACING\_VERSIONS} and \code{REPLACED\_BY\_VERSION}] + \item[\code{REPLACING_VERSIONS} and \code{REPLACED_BY_VERSION}] For corner cases in upgrade paths those variables can be defined - in \code{pkg\_*} functions to define a package version that is + in \code{pkg_*} functions to define a package version that is replaced by or is the replacement for the current one. See \featureref{replace-version-vars}. - \item[MERGE\_TYPE] This variable contains one of three possible + \item[\code{MERGE_TYPE}] This variable contains one of three possible values to allow checks for the purpose of the current run: \begin{description} \item[\code{source}] Building and installing a package from @@ -216,7 +217,7 @@ nonetheless. \item[\code{buildonly}] Building a binary package without installing it. \end{description} See \featureref{merge-type}. - \item[\code{REQUIRED\_USE}] This variable can be used similar to + \item[\code{REQUIRED_USE}] This variable can be used similar to the \code{(R|P)DEPEND} variables and define sets of USE flag combinations that are not allowed. All elements can be further nested to achieve more functionality. @@ -228,7 +229,7 @@ nonetheless. activated on \code{flag1} use "\code{flag1? || ( flag2 flag3 \dots )}". \item[XOR] To allow exactly one USE flag out of many use - "\code{\textasciicircum\textasciicircum ( flag1 flag2 \dots )}". + "\code{^^ ( flag1 flag2 \dots )}". \end{description} See \featureref{required-use}. \end{description} -- 1.7.2.5