Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 404740 Details for
Bug 551190
/ebuild-writing/eapi/ example uses nonfatal incorrectly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to replace the example
0001-Replace-nonfatal-example-with-something-correct.patch (text/plain), 1.62 KB, created by
Michał Górny
on 2015-06-07 12:45:39 UTC
(
hide
)
Description:
Patch to replace the example
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2015-06-07 12:45:39 UTC
Size:
1.62 KB
patch
obsolete
>From b35c0617907ed2c35369aa7da246683011c51caf Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> >Date: Sun, 7 Jun 2015 14:44:00 +0200 >Subject: [PATCH] Replace nonfatal example with something correct > >Replace the nonfatal example from a poor programming practice to a code >collecting logs for test failures. Copied from sys-apps/paludis. > >Fixes: https://bugs.gentoo.org/show_bug.cgi?id=551190 >--- > ebuild-writing/eapi/text.xml | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-) > >diff --git a/ebuild-writing/eapi/text.xml b/ebuild-writing/eapi/text.xml >index 3faab22..8b26382 100644 >--- a/ebuild-writing/eapi/text.xml >+++ b/ebuild-writing/eapi/text.xml >@@ -373,19 +373,29 @@ src_compile() { > </p> > <p>Example:</p> > <codesample lang="ebuild"> >-EAPI=1 >+EAPI=2 > ... >-src_install() { >- emake DESTDIR="${D}" install || die "make install failed" >- dodoc ChangeLog README >+src_test() { >+ if ! emake check ; then >+ eerror "Tests failed. Looking for files for you to add to your bug report..." >+ find "${S}" -type f -name '*.epicfail' -or -name '*.log' | while read a ; do >+ eerror " ${a}" >+ done >+ die "Make check failed" >+ fi > } > </codesample> > <codesample lang="ebuild"> > EAPI=4 > ... >-src_install() { >- emake DESTDIR="${D}" install >- nonfatal dodoc ChangeLog README >+src_test() { >+ if ! nonfatal emake check ; then >+ eerror "Tests failed. Looking for files for you to add to your bug report..." >+ find "${S}" -type f -name '*.epicfail' -or -name '*.log' | while read a ; do >+ eerror " ${a}" >+ done >+ die "Make check failed" >+ fi > } > </codesample> > </li> >-- >2.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 551190
: 404740