Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Proposal for compression handling (was: Re: prepalldocs is now banned)
Date: Thu, 19 Feb 2009 11:06:19
Message-Id: 18845.15657.287751.241885@a1ihome1.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] prepalldocs is now banned by Alexis Ballier
1 >>>>> On Wed, 18 Feb 2009, Alexis Ballier wrote:
2
3 >> If you really, genuinely think you have a case for compression of
4 >> docs, backed up with statistics showing that it's a relevant
5 >> change, then you should write a proposal for future EAPIs for
6 >> handling it,
7
8 > I don't understand why something that has been there for ages has to
9 > die. For what I've seen, the major (and only) problem with
10 > prepalldocs is its definition and I'm sure we can find one that
11 > everybody will agree with.
12
13 >> and you should do it in such a way that it works automatically for
14 >> all ebuilds, without any developer intervention (but providing some
15 >> way for ebuilds to disable it where necessary).
16
17 > This is probably a good start:
18 > http://archives.gentoo.org/gentoo-dev/msg_eb1f7952eb2f0fe725bde331a4d9ae30.xml
19
20 Let's fill this with some life. What do you think about the following
21 proposal:
22
23 Package managers supporting compression would internally maintain two
24 lists of paths, both having a default value, plus the possibility to
25 modify them from ebuilds/eclasses:
26
27 - an inclusion list, initially containing:
28 /usr/share/doc /usr/share/info /usr/share/man
29 - an exclusion list, initially containing:
30 /usr/share/doc/${PF}/html
31
32 Then we need a new command, let's call it "docompress" for now (name
33 to be discussed), to manipulate the lists:
34
35 - "docompress" (without option or with option "-a"): add paths
36 (directories or files) to the inclusion list
37 - "docompress -d": delete paths from the inclusion list
38 - "docompress -x": add paths to the exclusion list
39 - "docompress -x -d": remove paths from the exclusion list
40 (maybe this is not needed?)
41
42 (For package managers not supporting compression, "docompress" would
43 be a no-op.)
44
45 Between the src_install and pkg_postinst phases, the package manager
46 would then go through the inclusion list and optionally (depending on
47 the user's setting, i.e. PORTAGE_COMPRESS in the Portage case)
48 compress anything found there, excluding the stuff from the exclusion
49 list.
50
51 The two most common usage cases:
52
53 1. dodoc <file1> <file2> ...
54
55 and
56
57 2. emake ... docdir="/usr/share/doc/${PF}" install
58
59 would just work as expected, without any need for calling docompress.
60
61 A package that needs uncompressed documentation would simply call
62 "docompress -d /usr/share/doc" or
63 "docompress -x /usr/share/doc/${PF}/<some subdir>".
64
65 In addition, I think that Tiziano's suggestion to have "dodoc" operate
66 on directories (or to add a "-r" option as "doins" has) is also a good
67 idea.
68
69 Ulrich

Replies

Subject Author
Re: [gentoo-dev] Proposal for compression handling (was: Re: prepalldocs is now banned) Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>