Gentoo Archives: gentoo-dev

From: Donnie Berkholz <dberkholz@g.o>
To: gentoo-dev@l.g.o, jsbronder@g.o
Subject: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-cluster/torque: ChangeLog torque-2.3.0.ebuild
Date: Wed, 12 Mar 2008 23:40:31
Message-Id: 20080312234026.GA17388@comet.science.oregonstate.edu
1 On 17:55 Wed 12 Mar , Justin Bronder (jsbronder) wrote:
2 > 1.1 sys-cluster/torque/torque-2.3.0.ebuild
3 >
4 > file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/torque/torque-2.3.0.ebuild?rev=1.1&view=markup
5 > plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/torque/torque-2.3.0.ebuild?rev=1.1&content-type=text/plain
6
7 > pkg_setup() {
8 > linux-info_pkg_setup
9 > if use cpusets && ! use kernel_linux; then
10 > einfo
11 > elog " Torque currently only has support for cpusets in linux."
12 > elog "Assuming you didn't really want this USE flag."
13 > einfo
14 > elif use cpusets; then
15 > einfo
16 > elog " Torque support for cpusets is still in development, you may"
17 > elog "wish to disable it for production use."
18 > einfo
19 > if ! linux_chkconfig_present CPUSETS; then
20 > einfo
21 > elog " Torque support for cpusets will require that you recompile"
22 > elog "your kernel with CONFIG_CPUSETS enabled."
23 > einfo
24 > fi
25 > fi
26
27 This logic is really strange. Try this instead:
28
29 if use cpusets; then
30 if ! use kernel_linux; then
31 ...
32 else
33 ...
34 fi
35 fi
36
37 > }
38 >
39 > src_compile() {
40 > local myconf="--with-rcp=mom_rcp"
41 >
42 > use crypt && myconf="--with-rcp=scp"
43 >
44 > if use cpusets && use kernel_linux; then
45 > myconf="${myconf} --enable-cpusets"
46 > fi
47
48 The same logic is duplicated, once here and once earlier. It might be
49 nicer to just do it once, perhaps by setting a variable and checking it.
50
51 Thanks,
52 Donnie
53 --
54 gentoo-dev@l.g.o mailing list