Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-devhelp
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-devhelp@g.o
From: Thomas Sachau <tommy@g.o>
Subject: Re: Re: Calling the default implementation of a function
Date: Sat, 31 Oct 2009 19:22:51 +0100
Nikos Chantziaras schrieb:
> On 10/31/2009 07:46 PM, Thomas Sachau wrote:
>> Nikos Chantziaras schrieb:
>>> 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?
>>>
>>>
>>>
>>
>> 1. i suggest to use eautoreconf instead of those homegrown scripts.
> 
> I know, but it doesn't work in this case.  In short: doesn't work :P  In
> long: This is a dual ebuild (can be used as live as well as regular) for
> app-misc/mc, and mc really needs its own autogen.sh; it does weird stuff
> in there, much more than what eautoreconf does.
> 
> 
>> 2.<eclass>_src_prepare will call the src_prepare phase from<eclass>
> 
> Thanks.  What's the default eclass of ebuilds that don't have any
> "inherit" line in them?

No inherit => no eclass, simple as that ;-)

In that case, you can call the default function with just "default". But there is no need for that
for the default src_prepare since its empty by default.

-- 
Thomas Sachau

Gentoo Linux Developer


Attachment:
signature.asc (PGP signature)
Attachment:
signature.asc (OpenPGP digital signature)
References:
Calling the default implementation of a function
-- Nikos Chantziaras
Re: Calling the default implementation of a function
-- Thomas Sachau
Re: Calling the default implementation of a function
-- Nikos Chantziaras
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Calling the default implementation of a function
Next by thread:
Re: Calling the default implementation of a function
Previous by date:
Re: Calling the default implementation of a function
Next by date:
Re: Calling the default implementation of a function


Updated Nov 16, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.