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