Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 470612 - [Future EAPI] Use 'myeconfargs[@]' in default_src_configure
Summary: [Future EAPI] Use 'myeconfargs[@]' in default_src_configure
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PMS/EAPI
Depends on:
Blocks: future-eapi
  Show dependency tree
Reported: 2013-05-19 08:45 UTC by Michał Górny
Modified: 2014-08-05 07:13 UTC (History)
2 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-05-19 08:45:40 UTC
I'm just working on another ebuild with a lot of econf args, each with its own ugly '\' and relevant comments splattered randomly over the ebuild... this thing is just terrible.

Let's just mandate 'myeconfargs' in future EAPI. That is, allow doing:

  src_configure() {
    local myeconfargs=(
      # related to foo

      # $(use_with baz)
      $(use_enable narf)

Comment 1 Ulrich Müller gentoo-dev 2013-05-19 10:38:09 UTC
I dislike the recent proliferation of magic variables that influence functions' behaviour by side effects. Passing things as explicit parameters is so much cleaner.

You could just say econf "$(myeconfargs[@]}" in the last line of your example.
Comment 2 Ciaran McCreesh 2013-05-19 11:47:50 UTC
I was under the impression that parameters to phase functions were strongly disliked by the Council.
Comment 3 Ulrich Müller gentoo-dev 2013-05-19 12:33:03 UTC
econf is not a phase function.
Comment 4 Ciaran McCreesh 2013-05-19 12:51:30 UTC
The last line of his example is 'default', which calls a phase function.
Comment 5 SpanKY gentoo-dev 2013-05-21 22:15:57 UTC
(In reply to comment #1)

yeah, i can't see how the expansion of magic vars like this is better than accepting args to phase funcs
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-08-05 07:13:55 UTC
Let's forget about this.