Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31753 - arguments to functions are not given to imported functions
Summary: arguments to functions are not given to imported functions
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2003-10-22 10:29 UTC by Mamoru KOMACHI (RETIRED)
Modified: 2011-10-30 22:18 UTC (History)
0 users

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


Attachments
ebuid.sh.diff (ebuild.sh.diff,328 bytes, patch)
2003-10-22 10:35 UTC, Mamoru KOMACHI (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-22 10:29:32 UTC
Hi.

I maintain ruby.eclass and found that arguments to functions are not
given to imported functions if they override default functions such as
econf and unpack. For example, if the eclass looks like

ruby_econf() {
	./configure "$@" || die "econf failed"
}

and the ebuild is

inherit ruby

src_compile() {

	econf --with-docdir=/usr/share/doc/${PF} || die
}

then "--with-docdir=/usr/share/doc/${PF}" will not be passed to
ruby_econf (although econf in src_compile is overriden by ruby_econf).
If I change the ebuild to

src_compile() {

	ruby_econf --with-docdir=/usr/share/doc/${PF} || die
}

then --with-docdir is passed to ruby_econf. Arguments to econf
should be passed to ruby_econf regardless whether it is called as
ruby_econf or econf.

I will add a patch to /usr/sbin/ebuild.sh to fix the problem.
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-22 10:35:56 UTC
Created attachment 19624 [details, diff]
ebuid.sh.diff
Comment 2 SpanKY gentoo-dev 2003-10-23 21:42:29 UTC
i assume you had EXPORT_FUNCTIONS econf ?
Comment 3 Mamoru KOMACHI (RETIRED) gentoo-dev 2003-10-24 01:54:15 UTC
Yes, I had. This is because I want to call ruby_econf as econf if I inherit
ruby. Just as econf in base system detects ./configure script ruby_econf
detects extconf.rb and install.rb in addition to ./configure then run configuration
scripts (and supports ruby 1.6 and 1.8 SLOT).  I'm not sure whether I shouldn't
override default functions, but I think it is natural to extend econf in
this way. 
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2003-10-26 19:32:08 UTC
Ok. Included.