* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2013-05-10 22:55 Markos Chandras
0 siblings, 0 replies; 7+ messages in thread
From: Markos Chandras @ 2013-05-10 22:55 UTC (permalink / raw
To: gentoo-commits
commit: ce65c40e89184b7d17d051e0ba58ffdff705344c
Author: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
AuthorDate: Fri May 10 22:40:20 2013 +0000
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Fri May 10 22:54:26 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=ce65c40e
error-handling: Add note that ebuild-helpers die in EAPI>=4
Fixes bug #459296
---
ebuild-writing/error-handling/text.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index d60b855..40b8b5b 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -51,7 +51,7 @@ Some portage-provided functions will automatically die upon failure. Others will
not. It is for example safe to omit the <c>|| die</c> after a call to <c>epatch</c>,
but not <c>emake</c>. The reason is that external binaries are not able to call
die that is a bash function. You can see what commands are external binaries
-with <c>ls /usr/lib*/portage/bin/ebuild-helpers</c>.
+with <c>ls /usr/lib*/portage/bin/ebuild-helpers</c>. In <uri link="::ebuild-writing/eapi/#eapi=4">EAPI>=4</uri> all ebuild-helpers automatically die upon failure.
</p>
<p>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2017-05-06 22:49 Göktürk Yüksek
0 siblings, 0 replies; 7+ messages in thread
From: Göktürk Yüksek @ 2017-05-06 22:49 UTC (permalink / raw
To: gentoo-commits
commit: e2d15f91cfb5fc3d7773ee70dc8675b78e6500ca
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 27 23:07:35 2017 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Sat May 6 22:46:40 2017 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=e2d15f91
ebuild-writing/error-handling: improve ebuild and eclass failure behavior
Instead of explaining the EAPI<=4 die behavior initially, explain the
default behavior for the later EAPIs first. Remove the
portage-specific bits from the paragraph.
Reported-By: Benda Xu <heroxbd <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index 40b8b5b..da9e88d 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -47,11 +47,10 @@ function can die in multiple places.
</p>
<p>
-Some portage-provided functions will automatically die upon failure. Others will
-not. It is for example safe to omit the <c>|| die</c> after a call to <c>epatch</c>,
-but not <c>emake</c>. The reason is that external binaries are not able to call
-die that is a bash function. You can see what commands are external binaries
-with <c>ls /usr/lib*/portage/bin/ebuild-helpers</c>. In <uri link="::ebuild-writing/eapi/#eapi=4">EAPI>=4</uri> all ebuild-helpers automatically die upon failure.
+Ebuild helpers from EAPI 4 and onwards automatically die on
+failure. Some eclass-provided functions will automatically die upon
+failure, others will not. Developers should check the
+<uri link="::eclass-reference/">eclass reference</uri> when in doubt.
</p>
<p>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2019-12-02 21:33 Göktürk Yüksek
0 siblings, 0 replies; 7+ messages in thread
From: Göktürk Yüksek @ 2019-12-02 21:33 UTC (permalink / raw
To: gentoo-commits
commit: f1e70d2f313e385d5284b83f93566f5ea16973d0
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 19 21:50:15 2018 +0000
Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Mon Dec 2 21:32:12 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=f1e70d2f
ebuild-writing/error-handling: expand subshell warning to EAPI=7
Closes: https://github.com/gentoo/devmanual/pull/90
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index 96dc962..35c7419 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -69,7 +69,7 @@ It's best to use <c>|| die</c> too often than too little.
<body>
<warning>
-<c>die</c> <b>will not work in a subshell</b>.
+<c>die</c> <b>will not work in a subshell unless you are using EAPI=7 and onwards</b>.
</warning>
<p>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2021-03-21 5:48 Ulrich Müller
0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2021-03-21 5:48 UTC (permalink / raw
To: gentoo-commits
commit: 2fa7e69aa732f1053f6429d3a1fa4789a12b0c8b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 12 21:17:18 2021 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sun Mar 21 05:47:41 2021 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=2fa7e69a
ebuild-writing/error-handling: add note for external commands and die
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index f74f6d8..3c5289c 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -57,9 +57,10 @@ Sometimes displaying additional error information beforehand can be useful. Use
<c>eerror</c> to do this. See <uri link="::ebuild-writing/messages"/>.
</p>
-<p>
-It's best to use <c>|| die</c> too often than too little.
-</p>
+<note>
+You should use <c>die</c> on almost all external commands in ebuilds.
+</note>
+
</body>
</section>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2021-03-29 20:44 Ulrich Müller
0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2021-03-29 20:44 UTC (permalink / raw
To: gentoo-commits
commit: 56fe3529e0ae3d83bf5dc7e506345cbecf19ca0b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 09:26:05 2021 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 29 20:41:36 2021 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=56fe3529
ebuild-writing/error-handling: use eapply, not epatch
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index 110f317..2e99f17 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -96,7 +96,7 @@ When using pipes, a subshell is introduced, so the following is unsafe:
</p>
<codesample lang="ebuild">
-cat list | while read file ; do epatch ${file} ; done
+cat list | while read file ; do eapply ${file} ; done
</codesample>
<p>
@@ -105,7 +105,7 @@ avoids this problem:
</p>
<codesample lang="ebuild">
-while read file ; do epatch ${file} ; done < list
+while read file ; do eapply ${file} ; done < list
</codesample>
</body>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2024-09-28 19:35 Ulrich Müller
0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2024-09-28 19:35 UTC (permalink / raw
To: gentoo-commits
commit: 4f98f96490d3b691092f09556bbce54ec1613b9d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 25 08:39:28 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 28 19:33:58 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=4f98f964
ebuild-writing/error-handling: Fix example
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index 28dca4e..8b7f220 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -123,7 +123,7 @@ provides the <c>assert</c> function to check this variable.
</p>
<codesample lang="ebuild">
-bunzip2 "${DISTDIR}/${VIM_RUNTIME_SNAP}" | tar xf
+bzip2 -dc "${DISTDIR}/${VIM_RUNTIME_SNAP}" | tar -xf -
assert
</codesample>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/
@ 2024-09-28 19:35 Ulrich Müller
0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Müller @ 2024-09-28 19:35 UTC (permalink / raw
To: gentoo-commits
commit: ae6e8c59125c564a272b04609b3642fde8cd096e
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 25 09:25:23 2024 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 28 19:33:59 2024 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=ae6e8c59
ebuild-writing/error-handling: Refer to PIPESTATUS, not its value
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
ebuild-writing/error-handling/text.xml | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/ebuild-writing/error-handling/text.xml b/ebuild-writing/error-handling/text.xml
index 8b7f220..9ae9af9 100644
--- a/ebuild-writing/error-handling/text.xml
+++ b/ebuild-writing/error-handling/text.xml
@@ -112,14 +112,14 @@ while read file ; do eapply ${file} ; done < list
</section>
<section>
-<title>The <c>assert</c> function and <c>$PIPESTATUS</c></title>
+<title>The <c>assert</c> function and <c>PIPESTATUS</c></title>
<body>
<p>
-When using pipes, simple conditionals and tests upon <c>$?</c> will not correctly
-detect errors occurring in anything except the final command in the chain. To get
-around this, <c>bash</c> provides the <c>$PIPESTATUS</c> variable, and Portage
-provides the <c>assert</c> function to check this variable.
+When using pipes, simple conditionals and tests upon <c>$?</c> will not
+correctly detect errors occurring in anything except the final command in
+the chain. To get around this, bash provides the <c>PIPESTATUS</c> variable,
+and Portage provides the <c>assert</c> function to check this variable.
</p>
<codesample lang="ebuild">
@@ -128,8 +128,8 @@ assert
</codesample>
<p>
-If you need the gory details of <c>$PIPESTATUS</c>, see the bash manpage. Most of the
-time, <c>assert</c> is enough.
+If you need the gory details of <c>PIPESTATUS</c>, see the bash manpage.
+Most of the time, <c>assert</c> is enough.
</p>
</body>
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-28 19:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-29 20:44 [gentoo-commits] proj/devmanual:master commit in: ebuild-writing/error-handling/ Ulrich Müller
-- strict thread matches above, loose matches on Subject: below --
2024-09-28 19:35 Ulrich Müller
2024-09-28 19:35 Ulrich Müller
2021-03-21 5:48 Ulrich Müller
2019-12-02 21:33 Göktürk Yüksek
2017-05-06 22:49 Göktürk Yüksek
2013-05-10 22:55 Markos Chandras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox