Gentoo Archives: gentoo-dev

From: Doug Goldstein <cardoe@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] add built_with_use_die() to eutils.eclass ?
Date: Fri, 18 May 2007 14:13:15
Message-Id: 464DB2F6.5020903@gentoo.org
In Reply to: Re: [gentoo-dev] add built_with_use_die() to eutils.eclass ? by "Petteri Räty"
1 Petteri Räty wrote:
2 > Marius Mauch kirjoitti:
3 >
4 >> On Mon, 23 Apr 2007 23:45:48 +0200
5 >> dju` <dju@g.o> wrote:
6 >>
7 >>
8 >>> eerror "Your ${package} package has been built without"
9 >>> eerror "${func} support, please enable the '${use_flag}' USE flag and"
10 >>> eerror "re-emerge ${package}."
11 >>> elog "You can enable this USE flag either globally in /etc/make.conf,"
12 >>> elog "or just for specific packages in /etc/portage/package.use."
13 >>> die "${package} missing ${func} support"
14 >>>
15 >> A little detail about elog: You should not use different elog functions
16 >> (eerror, elog, ewarn, ...) within the same message as they may appear
17 >> out of order in the final log (e.g. the elog lines might appear before
18 >> the eerror lines). This is because messages of the same loglevel and in
19 >> the same phase are grouped together. It's an implementation detail that
20 >> might be changed in future versions, but for now you'll have to live
21 >> with it.
22 >>
23 >> Also I don't see much use in explaining how to enable a use flag inside
24 >> ebuilds, at most there should be a pointer to the real documentation
25 >> IMO.
26 >>
27 >> Marius
28 >>
29 >
30 > Any updates on this?
31 >
32 > betelgeuse@pena /usr/portage/eclass $ grep built_with_use_die -r .
33 > betelgeuse@pena /usr/portage/eclass $
34 >
35 > I for one would use it if it existed.
36 >
37 > Regards,
38 > Petteri
39 >
40 >
41 built_with_use sys-apps/pciutils zlib && die "You need to build
42 sys-apps/pciutils without zlib"
43
44 WHY do we need YET another function for such a simple construct?
45
46 built_with_use is already available and very powerful.
47
48 For example, HAL does..
49
50 built_with_use --missing false sys-apps/pciutils zlib
51
52 If the USE flag is missing entirely, it'll treat it like it's disabled
53 because old versions didn't have the zlib USE flag and didn't gzip their
54 data. Some packages it might be the other way around so you can pass
55 true instead.
56
57 Adding built_with_use_die is utterly pointless.
58
59 --
60 gentoo-dev@g.o mailing list