Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: Alistair Bush <ali_bush@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New eclass to support java-virtuals
Date: Thu, 20 Sep 2007 20:17:59
Message-Id: 20070920190909.GP31094@supernova
In Reply to: Re: [gentoo-dev] New eclass to support java-virtuals by Alistair Bush
1 On 06:58 Fri 21 Sep , Alistair Bush wrote:
2 > normally java-pkg_do_write_ is called to write the package.env out, as
3 > can be seen, and is the default behavior for the function. What I am
4 > adding is the ability to _do_write of a "[virtual|provider].env" file.
5 > While at present it only contains 3 variables, I see no reason why
6 > eventually it will not include other vars that are shared between the
7 > package.env and "virtual.env" ( e.g DESCRIPTION )
8 >
9 > Therefore this change can be summarized as
10 >
11 > + if [[ $1 != provider ]]; then
12 > #Do the default package.env behaviour
13 > + else
14 > + #Create a "virtual.env" file. This will only be invoked by
15 > + #ebuilds that inherit java-virtuals.eclass
16 > + fi
17 >
18 > I could very well reflactor the java-pkg_do_write_ function back to its
19 > current state and create a new function java-pkg_do_write_virtual to be
20 > called by java-virtuals-2.eclass.
21 >
22 > The documentation could (and will) be updated to more correctly reflect
23 > whats happening.
24
25 I'm concerned about code duplication, because that's what it looks like.
26 Refactoring might be a good idea.
27
28 Thanks,
29 Donnie
30 --
31 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] New eclass to support java-virtuals Alistair Bush <ali_bush@g.o>