From: Torsten Veller <ml-en@veller.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: perl-module.class review
Date: Mon, 21 Sep 2009 18:55:20 +0200 [thread overview]
Message-ID: <20090921184314.TA97f50.tv@veller.net> (raw)
In-Reply-To: <200909211810.59623.scarabeus@gentoo.org>
* Tomáš Chvátal <scarabeus@gentoo.org>:
> Dne pondělí 21 Září 2009 18:03:56 Torsten Veller napsal(a):
> > * Tomáš Chvátal <scarabeus@gentoo.org>:
> > > I think it is not required
> > > EXPF="src_compile src_test src_install" <- definition, also nulls
> > > anything what was in it before :]
> > > case ${EAPI:-0} in
> > > 2) EXPF="${EXPF} src_configure" ;;
> > > 1|0) ;;
> > > *) die "Unknown EAPI, Bug eclass maintainers." ;;
> > > esac
> > > EXPORT_FUNCTIONS ${EXPF} <- export
> >
> > And later in cmake-utils_src_compile you use:
> > | has src_configure ${EXPF} || cmake-utils_src_configure
> >
> > What will happen if an EAPI=2 ebuild inherits cmake-utils and another
> > eclass also using EXPF that does not EXPORT_FUNCTIONS src_configure and
> > the ebuild uses cmake-utils_src_compile?
> >
> > It will call cmake-utils_src_configure during src_configure and later in
> > cmake-utils_src_compile it will run cmake-utils_src_configure again,
> > won't it?
> >
> You dont do this magic before inherits, so you are safe, if you inherit in
> middle of your eclass code, then you probably deserve the breakage for
> writting such horrible thing ;]
I'am trying to give an example:
,----- test.eclass
EXPF=pkg_postinst
EXPORT_FUNCTIONS ${EXPF}
test_pkg_postinst() {
einfo test_pkg_postinst
}
'----- test.eclass
,----- another_test.eclass
EXPF="src_configure src_compile"
EXPORT_FUNCTIONS ${EXPF}
another_test_src_configure() {
einfo another_test_src_configure
}
another_test_src_compile() {
einfo another_test_src_compile
has src_configure ${EXPF} || another_test_src_configure
}
'----- another_test.eclass
,----- test.ebuild
EAPI=2
inherit another_test test
DESCRIPTION=""
HOMEPAGE=""
SRC_URI=""
LICENSE=""
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
'----- test.ebuild
It outputs:
* another_test_src_configure
* another_test_src_compile
* another_test_src_configure
* test_pkg_postinst
if s/EXPF/TEST_EXPF/ in test.eclass, it does:
* another_test_src_configure
* another_test_src_compile
* test_pkg_postinst
next prev parent reply other threads:[~2009-09-21 16:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-20 18:20 [gentoo-dev] perl-5.10.1 status update Torsten Veller
2009-09-20 18:28 ` [gentoo-dev] perl-module.class review Torsten Veller
2009-09-21 14:40 ` Ciaran McCreesh
2009-09-21 15:29 ` [gentoo-dev] " Torsten Veller
2009-09-21 15:38 ` Tomáš Chvátal
2009-09-21 16:03 ` Torsten Veller
2009-09-21 16:10 ` Tomáš Chvátal
2009-09-21 16:55 ` Torsten Veller [this message]
2009-09-21 17:51 ` Jeremy Olexa
2009-09-21 16:30 ` Maciej Mrozowski
2009-09-21 16:59 ` Torsten Veller
2009-10-27 10:10 ` [gentoo-dev] Re: perl-5.10.1 status update Torsten Veller
2009-10-27 10:59 ` Kent Fredric
2009-10-27 11:07 ` Patrick Lauer
2009-10-27 11:50 ` David Abbott
2009-10-28 9:21 ` Bernard Cafarelli
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=20090921184314.TA97f50.tv@veller.net \
--to=ml-en@veller.net \
--cc=gentoo-dev@lists.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