Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/common-mistakes/
Date: Wed, 22 Dec 2021 15:38:19
Message-Id: 1640187382.7ce5e147a7ef3b776cb3910c0c21b999f7e2839b.ulm@gentoo
1 commit: 7ce5e147a7ef3b776cb3910c0c21b999f7e2839b
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 1 02:50:13 2021 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 22 15:36:22 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7ce5e147
7
8 ebuild-writing/common-mistakes: add calling external tools without die
9
10 Suggested-by: Joonas Niilola <juippis <AT> gentoo.org>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12 [Internal cross reference fixed]
13 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
14
15 ebuild-writing/common-mistakes/text.xml | 13 +++++++++++++
16 1 file changed, 13 insertions(+)
17
18 diff --git a/ebuild-writing/common-mistakes/text.xml b/ebuild-writing/common-mistakes/text.xml
19 index e0cdd12..4e26462 100644
20 --- a/ebuild-writing/common-mistakes/text.xml
21 +++ b/ebuild-writing/common-mistakes/text.xml
22 @@ -13,6 +13,19 @@ writing ebuilds.
23 <section>
24 <title>Common Ebuild Writing Mistakes</title>
25
26 +<subsection>
27 +<title>Unguarded external calls</title>
28 +<body>
29 +
30 +<p>
31 +Calls to external tools should be guarded with <c>|| die</c> (or use
32 +<c>assert</c>) in almost all cases to allow failure to be detected.
33 +See <uri link="::ebuild-writing/error-handling/"/>.
34 +</p>
35 +
36 +</body>
37 +</subsection>
38 +
39 <subsection>
40 <title>Invalid use of <c>static</c> use-flag</title>
41 <body>