From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from <gentoo-devhelp+bounces-87-garchives=archives.gentoo.org@lists.gentoo.org>) id 1N4grK-0005ko-9P for garchives@archives.gentoo.org; Sun, 01 Nov 2009 20:17:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4A004E0A63; Sun, 1 Nov 2009 20:17:05 +0000 (UTC) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by pigeon.gentoo.org (Postfix) with ESMTP id E5C44E0A63 for <gentoo-devhelp@lists.gentoo.org>; Sun, 1 Nov 2009 20:17:04 +0000 (UTC) Received: from mail-in-05-z2.arcor-online.net (mail-in-05-z2.arcor-online.net [151.189.8.17]) by mx.arcor.de (Postfix) with ESMTP id F3EA0332708; Sun, 1 Nov 2009 21:17:03 +0100 (CET) Received: from mail-in-15.arcor-online.net (mail-in-15.arcor-online.net [151.189.21.55]) by mail-in-05-z2.arcor-online.net (Postfix) with ESMTP id EA7C32DAE83; Sun, 1 Nov 2009 21:17:03 +0100 (CET) Received: from [10.0.0.1] (athedsl-378076.home.otenet.gr [79.131.28.218]) (Authenticated sender: realnc@arcor.de) by mail-in-15.arcor-online.net (Postfix) with ESMTPSA id 818D6356866; Sun, 1 Nov 2009 21:17:03 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-15.arcor-online.net 818D6356866 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1257106623; bh=s9xgLP95TmFO2eEVQ1fTtV650mlil+ym+HIhBLjdWU0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Rafd+d0FIC5eLncPLeZ/iq94EbiKIrE3a29xW6ynE1HJTFO/OmJiPeKxMXNfad2Tw ilC/hL6l0XHncDh5F432HU5vMvwE6b5CO5N9LVZ+yDUHWU9hVgbMAN1GTjnZZYnQ0p Fc/T3A5g5RcPWWTorqWxAlgczXMfPj+hkrj4tHEk= Message-ID: <4AEDECC4.4080505@arcor.de> Date: Sun, 01 Nov 2009 22:17:08 +0200 From: Nikos Chantziaras <realnc@arcor.de> Organization: Lucas Barks User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091019 Thunderbird/3.0b4 Precedence: bulk List-Post: <mailto:gentoo-devhelp@lists.gentoo.org> List-Help: <mailto:gentoo-devhelp+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-devhelp+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-devhelp+subscribe@lists.gentoo.org> List-Id: Gentoo Development-related help <gentoo-devhelp.gentoo.org> X-BeenThere: gentoo-devhelp@gentoo.org X-BeenThere: gentoo-devhelp@lists.gentoo.org MIME-Version: 1.0 To: Mike Frysinger <vapier@gentoo.org> CC: gentoo-devhelp@lists.gentoo.org Subject: Re: [gentoo-devhelp] Re: Calling the default implementation of a function References: <hchm76$bpr$1@ger.gmane.org> <200910311737.31849.vapier@gentoo.org> <4AEDE2AC.4090809@arcor.de> <200911011503.47227.vapier@gentoo.org> In-Reply-To: <200911011503.47227.vapier@gentoo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 8971e68c-665b-4211-8254-59cbad0e4021 X-Archives-Hash: e978437b15ef2d51ab80afeab409296e 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)