Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 258534 Details for
Bug 341961
die in global scope instead of invalid DEPEND atom in eclasses
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
text documenting die usage
0001-bug-341961-add-text-about-die-in-global-scope.patch (text/plain), 1.40 KB, created by
Brian Harring (RETIRED)
on 2010-12-31 16:36:36 UTC
(
hide
)
Description:
text documenting die usage
Filename:
MIME Type:
Creator:
Brian Harring (RETIRED)
Created:
2010-12-31 16:36:36 UTC
Size:
1.40 KB
patch
obsolete
>From 2b398c91079022385fd932ff4159692822e96402 Mon Sep 17 00:00:00 2001 >From: Brian Harring <ferringb@gmail.com> >Date: Fri, 31 Dec 2010 08:32:44 -0800 >Subject: [PATCH] bug 341961; add text about die in global scope > >--- > eclass-writing/text.xml | 29 +++++++++++++++++++++++++++++ > 1 files changed, 29 insertions(+), 0 deletions(-) > >diff --git a/eclass-writing/text.xml b/eclass-writing/text.xml >index 36927ac..a770a9c 100644 >--- a/eclass-writing/text.xml >+++ b/eclass-writing/text.xml >@@ -295,6 +295,35 @@ jmake_src_compile() { > </body> > </section> > >+<section> >+<title>Handling incorrect usage of an eclass</title> >+<body> >+ >+<p> >+Sometimes an eclass is used incorrectly by an ebuild and the eclass >+knows it is being used incorrectly- the common example is an >+eclass that only works with a specific set of EAPIs, but is being >+accessed inherited by an ebuild with a different EAPI. >+In those cases, used sparingly as a last resort, it is allowed >+for an eclass to invoke die from the global scope. For example: >+</p> >+ >+<codesample lang="ebuild"> >+# Copyright 1999-2010 Gentoo Foundation >+# Distributed under the terms of the GNU General Public License v2 >+# $Header: $ >+ >+# Original Author: Captain Tight Pant >+# Purpose: Demonstration of die upon invalid EAPI usage. >+ >+case ${EAPI:-0} in >+ 0) die "this eclass doesn't support EAPI 0" ;; >+ *) ;; >+esac >+</codesample> >+</body> >+</section> >+ > </body> > > </chapter> >-- >1.7.3.4 >
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 Raw
Actions:
View
Attachments on
bug 341961
: 258534