From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-844899-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id CF41B1384B4
	for <garchives@archives.gentoo.org>; Sun,  8 Nov 2015 19:37:16 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4380821C01E;
	Sun,  8 Nov 2015 19:37:04 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2F4C421C01E
	for <gentoo-commits@lists.gentoo.org>; Sun,  8 Nov 2015 19:37:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5641D340702
	for <gentoo-commits@lists.gentoo.org>; Sun,  8 Nov 2015 19:36:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 53DC122D4
	for <gentoo-commits@lists.gentoo.org>; Sun,  8 Nov 2015 19:36:53 +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: <1447010960.1d699b5c40d334adc62fdb2e079851d8814b384b.ulm@gentoo>
Subject: [gentoo-commits] proj/pms:eapi-6 commit in: /
X-VCS-Repository: proj/pms
X-VCS-Files: eapi-differences.tex pkg-mgr-commands.tex
X-VCS-Directories: /
X-VCS-Committer: ulm
X-VCS-Committer-Name: Ulrich Müller
X-VCS-Revision: 1d699b5c40d334adc62fdb2e079851d8814b384b
X-VCS-Branch: eapi-6
Date: Sun,  8 Nov 2015 19:36:53 +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-Archives-Salt: 9da321ef-73f2-4269-9c4c-8f35790018ec
X-Archives-Hash: f934d87435e7cd4a0763c711fb5dcee2

commit:     1d699b5c40d334adc62fdb2e079851d8814b384b
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 23 11:28:01 2015 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Nov  8 19:29:20 2015 +0000
URL:        https://gitweb.gentoo.org/proj/pms.git/commit/?id=1d699b5c

EAPI 6 has einstalldocs.

This also adds support for an empty DOCS variable and for directories
in DOCS.

Bug: 459692
Bug: 463736
Bug: 481980

 eapi-differences.tex |  4 ++++
 pkg-mgr-commands.tex | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/eapi-differences.tex b/eapi-differences.tex
index 0756581..b9734e4 100644
--- a/eapi-differences.tex
+++ b/eapi-differences.tex
@@ -230,6 +230,9 @@ Controllable compression & \compactfeatureref{docompress} &
 \t{default} function & \compactfeatureref{default-func} &
     * & Yes & Yes & Yes & Yes \\
 
+\t{einstalldocs} & \compactfeatureref{einstalldocs} &
+    No & No & No & No & Yes \\
+
 File mtimes preserved & \compactfeatureref{mtime-preserve} &
     Undefined & Yes & Yes & Yes & Yes \\
 
@@ -348,6 +351,7 @@ EAPI 6 is EAPI 5 with the following changes:
 \item \t{unpack} supports absolute and relative paths, \featureref{unpack-absolute}.
 \item \t{unpack} supports \t{.txz}, \featureref{unpack-extensions}.
 \item \t{unpack} matches filename extensions case-insensitively, \featureref{unpack-ignore-case}.
+\item \t{einstalldocs} support, \featureref{einstalldocs}.
 \end{compactitem}
 
 \ChangeWhenAddingAnEAPI{6}

diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 6b4ecb9..6d08673 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -930,8 +930,42 @@ has returned.
     section~\ref{sec:default-phase-funcs}). Must not be called if the \t{default\_} function does
     not exist for the current phase in the current EAPI\@. Only available in EAPIs listed in
     table~\ref{tab:default-function-table}.
+
+\item[einstalldocs] \featurelabel{einstalldocs} Takes no arguments. Installs the files specified
+    by the \t{DOCS} and \t{HTML\_DOCS} variables or a default set of files, according to
+    Algorithm~\ref{alg:einstalldocs}. If called using \t{nonfatal} and any of the called commands
+    returns a non-zero exit status, returns immediately with the same exit status. Only available
+    in EAPIs listed in table~\ref{tab:einstalldocs} as supporting \t{einstalldocs}.
 \end{description}
 
+\begin{algorithm}
+\caption{einstalldocs logic} \label{alg:einstalldocs}
+\begin{algorithmic}[1]
+\STATE save the value of the install directory for \t{dodoc}
+\STATE set the install directory for \t{dodoc} to \t{/usr/share/doc/\$\{PF\}}
+\IF{the DOCS variable is a non-empty array}
+    \STATE call \t{dodoc -r "\$\{DOCS[@]\}"}
+\ELSIF{the DOCS variable is a non-empty scalar}
+    \STATE call \t{dodoc -r \$\{DOCS\}}
+\ELSIF{the DOCS variable is unset}
+    \FORALL{$d$ matching the filename expansion of \t{README*} \t{ChangeLog} \t{AUTHORS} \t{NEWS}
+            \t{TODO} \t{CHANGES} \t{THANKS} \t{BUGS} \t{FAQ} \t{CREDITS} \t{CHANGELOG}}
+        \IF{file $d$ exists and has a size greater than zero}
+            \STATE call \t{dodoc} with $d$ as argument
+        \ENDIF
+    \ENDFOR
+\ENDIF
+\STATE set the install directory for \t{dodoc} to \t{/usr/share/doc/\$\{PF\}/html}
+\IF{the HTML\_DOCS variable is a non-empty array}
+    \STATE call \t{dodoc -r "\$\{HTML\_DOCS[@]\}"}
+\ELSIF{the HTML\_DOCS variable is a non-empty scalar}
+    \STATE call \t{dodoc -r \$\{HTML\_DOCS\}}
+\ENDIF
+\STATE restore the value of the install directory for \t{dodoc}
+\RETURN shell true (0)
+\end{algorithmic}
+\end{algorithm}
+
 \ChangeWhenAddingAnEAPI{6}
 \begin{centertable}{EAPIs supporting the \t{default} function}
     \label{tab:default-function-table}
@@ -946,6 +980,20 @@ has returned.
     \end{tabular}
 \end{centertable}
 
+\ChangeWhenAddingAnEAPI{6}
+\begin{centertable}{EAPIs supporting \t{einstalldocs}}
+    \label{tab:einstalldocs}
+    \begin{tabular}{ll}
+      \toprule
+      \multicolumn{1}{c}{\textbf{EAPI}} &
+      \multicolumn{1}{c}{\textbf{Supports \t{einstalldocs}?}} \\
+      \midrule
+      0, 1, 2, 3, 4, 5  & No  \\
+      6                 & Yes \\
+      \bottomrule
+    \end{tabular}
+\end{centertable}
+
 \subsubsection{Debug Commands}
 The following commands are available for debugging. Normally all of these commands should be no ops;
 a package manager may provide a special debug mode where these commands instead do something.