Gentoo Archives: gentoo-dev

From: Michael Hanselmann <hansmi@g.o>
To: Benedikt Boehm <hollow@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] qmail.eclass draft
Date: Fri, 20 Jul 2007 21:22:17
Message-Id: 20070720211746.GC2975@hansmi.ch
In Reply to: Re: [gentoo-dev] [RFC] qmail.eclass draft by Benedikt Boehm
1 On Fri, Jul 20, 2007 at 10:05:23PM +0200, Benedikt Boehm wrote:
2 > > qmail_base_install should be split in smaller functions, maybe with
3 > > callbacks (if possible in bash).
4
5 > There is now qmail_mini_install (called by every qmail ebuild) and
6 > qmail_{full,man,sendmail}_install for the rest of a full blown install.
7
8 > I'm not sure what you mean with "callbacks" here, maybe you can
9 > elaborate?
10
11 If we have a common part which cannot, due to whatever reason, be split
12 into several functions, but we've to do something package specific in
13 between, we need callbacks. Just a sample (might not work at all, I'm
14 not that much into eclasses):
15
16 foo.eclass:
17 foo_src_install() {
18 # Some prefix code
19 # …
20
21 package_specific_code
22
23 # Some postfix code
24 # …
25 }
26
27 foo-simple.ebuild:
28 src_install() { foo_src_install }
29 package_specific_code() {
30 # code for foo-simple
31 }
32
33 foo-adv.ebuild:
34 src_install() { foo_src_install }
35 package_specific_code() {
36 # code for foo-adv
37 }
38
39 > The qmail_*_install changes are already in my overlay,
40
41 How can I get it using SVN? Looking at the site for more than a minute
42 shouldn't be required to find it.
43
44 Btw.: you didn't correct your blog posting to show the actual facts.
45
46 Thanks,
47 Michael
48
49 --
50 http://hansmi.ch/

Replies

Subject Author
Re: [gentoo-dev] [RFC] qmail.eclass draft Benedikt Boehm <hollow@g.o>