Gentoo Archives: gentoo-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] making dodoc and dohtml die when they fail and stricter is on
Date: Mon, 26 Dec 2005 00:15:16
Message-Id: 200512260913.39975.jstubbs@gentoo.org
In Reply to: [gentoo-dev] making dodoc and dohtml die when they fail and stricter is on by "Petteri Räty"
1 On Monday 26 December 2005 08:14, Brian Harring wrote:
2 > On Mon, Dec 26, 2005 at 12:54:04AM +0200, Petteri Räty wrote:
3 > > Currently there are quite a few ebuilds in the tree that execute dodoc
4 > > or dohtml for files that do not exist. I think it would be nice to have
5 > > ebuilds die if this is the case. To not break current ebuilds this would
6 > > only happen with FEATURES="stricter". This is what I currently do in my
7 > > bashrc. Obviously when integreted to portage one can use helper
8 > > functions like hasq which are not available in bashrc.
9 > >
10 > >
11 > > if [[ "${FEATURES/stricter}" != "${FEATURES}" ]]; then
12 > >
13 > > _makefail() {
14 > > bin="/usr/lib/portage/bin/${1}"
15 > > shift 1
16 > > "${bin}" "${@}" || die "${bin} ${@} failed"
17 > > }
18 > >
19 > > dodoc() { _makefail ${FUNCNAME} "${@}"; }
20 > > dohtml() { _makefail ${FUNCNAME} "${@}"; }
21 >
22 > Seems like more of a -dev discussion imo, since they're the ones
23 > affected by it (for us it's just an api change).
24
25 As a side note, dodoc didn't return non-zero when specified files don't exist
26 up until a month or two ago. dohtml was updated yesterday. Hence, up until
27 now the above was not possible.
28
29 --
30 Jason Stubbs
31
32 --
33 gentoo-dev@g.o mailing list

Replies