Gentoo Archives: gentoo-devhelp

From: Mike Frysinger <vapier@g.o>
To: gentoo-devhelp@l.g.o
Cc: Nikos Chantziaras <realnc@×××××.de>
Subject: Re: [gentoo-devhelp] Re: Calling the default implementation of a function
Date: Sun, 01 Nov 2009 20:02:58
Message-Id: 200911011503.47227.vapier@gentoo.org
In Reply to: [gentoo-devhelp] Re: Calling the default implementation of a function by Nikos Chantziaras
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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-devhelp] Re: Calling the default implementation of a function Nikos Chantziaras <realnc@×××××.de>