Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 470612

Summary: [Future EAPI] Use 'myeconfargs[@]' in default_src_configure
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: esigra, pacho
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

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
      --with-foo
      --with-bar

      # $(use_with baz)
      $(use_enable narf)
    )

    default
  }
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.