Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-devhelp
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Mike Frysinger <vapier@g.o>
From: Nikos Chantziaras <realnc@...>
Subject: Re: Re: Calling the default implementation of a function
Date: Sun, 01 Nov 2009 22:17:08 +0200
On 11/01/2009 10:03 PM, Mike Frysinger wrote:
> On Sunday 01 November 2009 14:34:04 Nikos Chantziaras wrote:
>> On 10/31/2009 11:37 PM, Mike Frysinger wrote:
>>> On Saturday 31 October 2009 11:47:54 Nikos Chantziaras wrote:
>>>> Is there a way to call the default implementation of a function inside
>>>> the ebuild-specified one?
>>>>
>>>> What I mean is:
>>>>
>>>> src_prepare() {
>>>> 	if [ "$PV" == "9999" ]; then
>>>> 		./autogen.sh
>>>> 	else
>>>> 		src_prepare() # Default from eclass.
>>>> 	fi
>>>> }
>>>>
>>>> Possible?
>>>
>>> better to wrap the func definition:
>>> if [[ ${PV} == "9999" ]] ; then
>>> src_prepare() { eautoreconf; }
>>> fi
>>
>> /usr/local/portage/app-misc/mc/mc-9999.ebuild: line 49: syntax error
>> near unexpected token `fi'
>> /usr/local/portage/app-misc/mc/mc-9999.ebuild: line 49: `fi'
>>    * ERROR: app-misc/mc-9999 failed:
>>    *   error sourcing ebuild
>
> works fine for me.  either you copied it wrong, or your ebuild has an error in
> it unrelated to this, or you're using a bash version older than stable which
> has a parsing bug and thus i dont care ;).
> -mike

Correct, I forgot the semicolon after ./autogen.sh.  Thanks for this 
tip, didn't know it was possible (I'm not that fluid in Bash, my mind is 
too much C-oriented :P)


References:
Calling the default implementation of a function
-- Nikos Chantziaras
Re: Calling the default implementation of a function
-- Mike Frysinger
Re: Calling the default implementation of a function
-- Nikos Chantziaras
Re: Re: Calling the default implementation of a function
-- Mike Frysinger
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: Calling the default implementation of a function
Next by thread:
autotools again
Previous by date:
Re: Re: Calling the default implementation of a function
Next by date:
autotools again


Updated Jun 03, 2012

Summary: Archive of the gentoo-devhelp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.