public inbox for gentoo-devhelp@lists.gentoo.org
 help / color / mirror / Atom feed
From: Nikos Chantziaras <realnc@arcor.de>
To: Mike Frysinger <vapier@gentoo.org>
Cc: gentoo-devhelp@lists.gentoo.org
Subject: Re: [gentoo-devhelp] Re: Calling the default implementation of a function
Date: Sun, 01 Nov 2009 22:17:08 +0200	[thread overview]
Message-ID: <4AEDECC4.4080505@arcor.de> (raw)
In-Reply-To: <200911011503.47227.vapier@gentoo.org>

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)



      reply	other threads:[~2009-11-01 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-31 15:47 [gentoo-devhelp] Calling the default implementation of a function Nikos Chantziaras
2009-10-31 17:46 ` Thomas Sachau
2009-10-31 18:06   ` [gentoo-devhelp] " Nikos Chantziaras
2009-10-31 18:22     ` Thomas Sachau
2009-10-31 21:37 ` [gentoo-devhelp] " Mike Frysinger
2009-11-01 19:34   ` [gentoo-devhelp] " Nikos Chantziaras
2009-11-01 20:03     ` Mike Frysinger
2009-11-01 20:17       ` Nikos Chantziaras [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AEDECC4.4080505@arcor.de \
    --to=realnc@arcor.de \
    --cc=gentoo-devhelp@lists.gentoo.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox