1 |
On Sunday 01 November 2009 14:34:04 Nikos Chantziaras wrote: |
2 |
> On 10/31/2009 11:37 PM, Mike Frysinger wrote: |
3 |
> > On Saturday 31 October 2009 11:47:54 Nikos Chantziaras wrote: |
4 |
> >> Is there a way to call the default implementation of a function inside |
5 |
> >> the ebuild-specified one? |
6 |
> >> |
7 |
> >> What I mean is: |
8 |
> >> |
9 |
> >> src_prepare() { |
10 |
> >> if [ "$PV" == "9999" ]; then |
11 |
> >> ./autogen.sh |
12 |
> >> else |
13 |
> >> src_prepare() # Default from eclass. |
14 |
> >> fi |
15 |
> >> } |
16 |
> >> |
17 |
> >> Possible? |
18 |
> > |
19 |
> > better to wrap the func definition: |
20 |
> > if [[ ${PV} == "9999" ]] ; then |
21 |
> > src_prepare() { eautoreconf; } |
22 |
> > fi |
23 |
> |
24 |
> /usr/local/portage/app-misc/mc/mc-9999.ebuild: line 49: syntax error |
25 |
> near unexpected token `fi' |
26 |
> /usr/local/portage/app-misc/mc/mc-9999.ebuild: line 49: `fi' |
27 |
> * ERROR: app-misc/mc-9999 failed: |
28 |
> * error sourcing ebuild |
29 |
|
30 |
works fine for me. either you copied it wrong, or your ebuild has an error in |
31 |
it unrelated to this, or you're using a bash version older than stable which |
32 |
has a parsing bug and thus i dont care ;). |
33 |
-mike |