Gentoo Archives: gentoo-dev

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] prepalldocs implementation in eutils.eclass (was: prepalldocs is now banned)
Date: Thu, 19 Feb 2009 09:11:36
Message-Id: 1235034692.23302.14.camel@localhost
In Reply to: Re: [gentoo-dev] prepalldocs implementation in eutils.eclass (was: prepalldocs is now banned) by Michael Sterrett
1 Am Mittwoch, den 18.02.2009, 03:22 -0500 schrieb Michael Sterrett:
2 > Patches welcome.
3 >
4 > On Wed, Feb 18, 2009 at 3:13 AM, Torsten Veller <ml-en@××××××.net> wrote:
5 > > * Michael Sterrett <mr_bones_@g.o>:
6 > >> I added a prepalldocs function to eutils.eclass to provide the
7 > >> functionality. It implements the
8 > >> behavior of the current stable sys-apps/portage-2.1.6.4.
9 > >
10 > > ecompressdir is more portage internal than prepalldocs ever was.
11 > > This must be fixed.
12 > >
13 > >
14 Instead of breaking things you could have tried to come up with a real
15 solution.
16
17 Even though I share the opinion that compressing docs is unnecessary I
18 started looking through the use cases.
19 I'm not done yet, but I think I already identified a couple of common
20 cases:
21
22 [1]
23 src_install() {
24 emake DESTDIR="${D}" docdir="/usr/share/doc/${PF}"
25 prepalldocs
26 }
27 (or similar)
28 will change to:
29 src_install() {
30 emake DESTDIR="${D}" docdir="${T}/doc"
31 dodoc "${T}/doc"
32 }
33
34 [2]
35 Not needed at all since every doc gets installed using dodoc or newdoc
36
37 [3]
38 Package installs doc to wrong location.
39 Solution: dodoc <OLDLOCATION>/* ; rm -rf <OLDLOCATION>
40
41 [4]
42 Assuming that "make install" installs something in /usr/share/doc/${PF}.
43 Assumption is wrong since "make install" will install
44 to /usr/share/doc/${P} if at all (since the package doesn't know
45 anything about -rX). So it should be changed anyway and then case [1] or
46 [3] applies.
47
48 Example packages for case [1]: app-arch/gtk-splitter, app-cdr/cdcover,
49 app-crypt/steghide, app-editors/lpe, app-emacs/ess
50 Example packages for case [2]: app-arch/rar, app-backup/amanda
51 Example packages for case [3]: app-crypt/gnupg
52 Example packages for case [4]: app-arch/xdms, app-crypt/gnupg-pkcs11-scd
53
54 The only problem I see here is that either <OLDLOCATION> or ${T}/doc
55 contains subdirs. So my proposal for the next EAPI is to allow dodoc and
56 newdoc to operate on dirs. Which also gives the benefit to reduce this
57 idiom:
58 insinto /usr/share/doc/${PF}
59 doins -r examples
60 to:
61 dodoc examples
62
63
64 Your comments?
65
66 Cheers,
67 Tiziano
68
69
70
71 --
72 -------------------------------------------------------
73 Tiziano Müller
74 Gentoo Linux Developer, Council Member
75 Areas of responsibility:
76 Samba, PostgreSQL, CPP, Python, sysadmin
77 E-Mail : dev-zero@g.o
78 GnuPG FP : F327 283A E769 2E36 18D5 4DE2 1B05 6A63 AE9C 1E30

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies