Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352145 - autotools-utils.eclass example should use local variable for myeconfargs
Summary: autotools-utils.eclass example should use local variable for myeconfargs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-19 18:38 UTC by Nathan Phillip Brink (binki) (RETIRED)
Modified: 2011-01-22 20:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
autotools-utils-local-myeconfargs.patch (autotools-utils-local-myeconfargs.patch,800 bytes, patch)
2011-01-19 18:41 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-01-19 18:38:52 UTC
See how the cmake-utils.eclass encourages people to define mycmakeargs to be a local variable. In the autotools-utils.eclass, the example shows the variable ``myeconfargs'' being set into the global scope. This violates convention, where globally-scoped variables should
1. have UPPERCASE names
2. avoided when the variable is dynamically built and only has implications for the current ebuild stage and shouldn't be seen by the invoked buildsystem.
Comment 1 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-01-19 18:41:09 UTC
Created attachment 260282 [details, diff]
autotools-utils-local-myeconfargs.patch
Comment 2 Wormo (RETIRED) gentoo-dev 2011-01-19 21:19:42 UTC
Thanks for reporting this cleanup, assigning to eclass maintainer
Comment 3 Maciej Mrozowski gentoo-dev 2011-01-20 00:13:38 UTC
Fixed. Thanks for reporting!
Comment 4 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-01-21 20:20:09 UTC
You missed the second hunk of my patch :-p.

Thanks for committing the first hunk anyways! :-)

--- autotools-utils.eclass      20 Jan 2011 00:12:59 -0000      1.6
+++ autotools-utils.eclass      21 Jan 2011 20:19:40 -0000
@@ -111,3 +111,3 @@
 # src_configure() {
-#      myeconfargs=(
+#      local myeconfargs=(
 #              --disable-readline
Comment 5 Maciej Mrozowski gentoo-dev 2011-01-22 20:30:29 UTC
<insert random vulgar word here>
I should stop providing so many usage examples ;)

Thanks for head up.