Gentoo Archives: gentoo-dev

From: Robert Buchholz <rbu@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI
Date: Sun, 05 Oct 2008 16:47:14
Message-Id: 200810051847.09259.rbu@gentoo.org
In Reply to: Re: [gentoo-dev] Default src_install for EAPI-2 or following EAPI by Ulrich Mueller
1 On Sunday, 5. October 2008, Ulrich Mueller wrote:
2 > >>>>> On Sun, 5 Oct 2008, Robert Buchholz wrote:
3 > >> >
4 > >> > It's not. If you want to have default DOCS then you should loop
5 > >> > through the items and check with [[ -e ]] before trying to
6 > >> > install them.
7 > >>
8 > >> So, maybe just do a 'dodoc "${DOCS}"' and omit the die? Then it won't
9 > >> fail but the warning message would be preserved.
10 > >
11 > > I understood Petteri's comment to be related to the default case
12 > > (i.e. the else-branch), and I have to agree there: Ebuilds that do
13 > > not override src_install should not emit a warning when some
14 > > ChangeLog file is missing that the ebuild never specified to
15 > > install.
16 >
17 > The default would be an empty DOCS variable, or did I miss something?
18
19 Correct.
20
21 > So if the ebuild includes non-existing files in DOCS, then why would
22 > you want to suppress the warnings?
23
24 I don't. My point was that the default action on an empty DOCS variable is
25 to "dodoc AUTHORS ChangeLog NEWS README", and this should not emit
26 warnings, because it is merely a heuristic.
27
28 To be clearer:
29 else
30 - # No die here because we don't know if any of these exist
31 - dodoc AUTHORS ChangeLog NEWS README
32 + for x in AUTHORS ChangeLog NEWS README; do
33 + if [ -e ${x} ]; then
34 + dodoc ${x} || die "dodoc ${x} failed"
35 + fi
36 + done
37 fi
38
39
40 Robert

Attachments

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

Replies