Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms:master commit in: /
Date: Thu, 04 Oct 2018 15:29:52
Message-Id: 1538666544.e380089851b24af5e3f9fae9d0605184b88ad637.mgorny@gentoo
1 commit: e380089851b24af5e3f9fae9d0605184b88ad637
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 23 16:44:06 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 4 15:22:24 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=e3800898
7
8 docompress: Specify the behavior for compressed files more strictly
9
10 Specify the behavior for dealing with already compressed files more
11 strictly, by requiring them not to be compressed twice if compressed
12 using the same format already. This replaces the previous vague
13 statement of 'behaving sensibly if already compressed'. This statement
14 had a number of problems.
15
16 Firstly, it was entirely vague on what 'sensible behavior' is. Most
17 of the developers seemed to presume it means decompressing the file
18 and compressing it again. However, without a clearly defined list
19 of compression formats to support, this is impossible to implement
20 properly.
21
22 Secondly, different package managers disagreed on the implementation.
23 For example, Portage recompressed the file, with the implementation
24 originally supporting .Z, .gz and .bz2, and later gaining support for
25 .lzma and .xz (independently of EAPI support for those formats).
26 PkgCore and Paludis never supported controllable compression, so they
27 always installed the files in original format.
28
29 The new wording aims to be more precise and strict while preserving
30 the spirit of the original and allowing the behavior currently exhibited
31 by the package manager implementations. Most notably, it accounts for
32 the possibility of the same file being iterated over by the compression
33 routine twice.
34
35 It does not require the package manager to recognize arbitrary
36 compressed file formats, making the current implementations compliant
37 with it. At the same time, it implies that the developers need to
38 account for the package manager not handling the particular compressed
39 file format used upstream, and appropriately needing to decompress
40 the file in order to fully respect controllable compression.
41
42 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
43
44 pkg-mgr-commands.tex | 6 +++---
45 1 file changed, 3 insertions(+), 3 deletions(-)
46
47 diff --git a/pkg-mgr-commands.tex b/pkg-mgr-commands.tex
48 index 1e414d4..90b62aa 100644
49 --- a/pkg-mgr-commands.tex
50 +++ b/pkg-mgr-commands.tex
51 @@ -774,9 +774,9 @@ times or if an item is a symlink.
52
53 \featurelabel{docompress} In EAPIs listed in table~\ref{tab:staging-area-commands} as supporting
54 controllable compression, the package manager may optionally compress a subset of the files under
55 -the \t{ED} directory. The package manager shall ensure that its compression mechanisms behave
56 -sensibly even if a file is already compressed. For compression, the initial values of the two lists
57 -are as follows:
58 +the \t{ED} directory. The package manager shall ensure that its compression mechanisms do not
59 +compress a file twice if it is already compressed using the same compressed file format.
60 +For compression, the initial values of the two lists are as follows:
61
62 \begin{compactitem}
63 \item The inclusion list contains \t{/usr/share/doc}, \t{/usr/share/info} and \t{/usr/share/man}.