commit: e380089851b24af5e3f9fae9d0605184b88ad637
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 23 16:44:06 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Oct 4 15:22:24 2018 +0000
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=e3800898
docompress: Specify the behavior for compressed files more strictly
Specify the behavior for dealing with already compressed files more
strictly, by requiring them not to be compressed twice if compressed
using the same format already. This replaces the previous vague
statement of 'behaving sensibly if already compressed'. This statement
had a number of problems.
Firstly, it was entirely vague on what 'sensible behavior' is. Most
of the developers seemed to presume it means decompressing the file
and compressing it again. However, without a clearly defined list
of compression formats to support, this is impossible to implement
properly.
Secondly, different package managers disagreed on the implementation.
For example, Portage recompressed the file, with the implementation
originally supporting .Z, .gz and .bz2, and later gaining support for
.lzma and .xz (independently of EAPI support for those formats).
PkgCore and Paludis never supported controllable compression, so they
always installed the files in original format.
The new wording aims to be more precise and strict while preserving
the spirit of the original and allowing the behavior currently exhibited
by the package manager implementations. Most notably, it accounts for
the possibility of the same file being iterated over by the compression
routine twice.
It does not require the package manager to recognize arbitrary
compressed file formats, making the current implementations compliant
with it. At the same time, it implies that the developers need to
account for the package manager not handling the particular compressed
file format used upstream, and appropriately needing to decompress
the file in order to fully respect controllable compression.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
pkg-mgr-commands.tex | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
index 1e414d4..90b62aa 100644
--- a/pkg-mgr-commands.tex
+++ b/pkg-mgr-commands.tex
@@ -774,9 +774,9 @@ times or if an item is a symlink.
\featurelabel{docompress} In EAPIs listed in
table~\ref{tab:staging-area-commands} as supporting
controllable compression, the package manager may optionally compress a subset
of the files under
-the \t{ED} directory. The package manager shall ensure that its compression
mechanisms behave
-sensibly even if a file is already compressed. For compression, the initial
values of the two lists
-are as follows:
+the \t{ED} directory. The package manager shall ensure that its compression
mechanisms do not
+compress a file twice if it is already compressed using the same compressed
file format.
+For compression, the initial values of the two lists are as follows:
\begin{compactitem}
\item The inclusion list contains \t{/usr/share/doc}, \t{/usr/share/info} and
\t{/usr/share/man}.