Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaranm@×××××××.org>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour
Date: Thu, 22 Feb 2007 19:13:36
Message-Id: 20070222190848.051c3944@snowdrop
1 Is the current || ( use? ( ) ) behaviour something that is desirable?
2 As far as I know, every package manager currently implements it, but
3 it's also one of those things that's a nuisance to explain and it
4 appears to exist only because of how early Portage versions did
5 flattening.
6
7 More specifically:
8
9 Inside || ( ) blocks, the package manager first removes any use? ( )
10 blocks that are *immediate* (that is to say, not inside ( ) themselves)
11 children if the use flag is not enabled (or disabled for !use?). Then,
12 if the || ( ) block is empty, it is discarded.
13
14 The example given in ebuild(5) is:
15
16 || (
17 sdl? ( media-libs/libsdl )
18 svga? ( media-libs/svgalib )
19 opengl? ( virtual/opengl )
20 ggi? ( media-libs/libggi )
21 virtual/x
22 )
23
24 As has been discussed in the past, the only correct way of handling
25 this from an ebuild perspective is lots of use && has_version calls
26 (relying upon use only is insufficient, since if two or more flags are
27 used, only one of the dependencies need be installed; relying upon
28 has_version only is insufficient, since a dependency may be installed
29 but its associated use flag could still be turned off).
30
31 So, is there a legitimate reason for this complication to exist? Or
32 should use? blocks being direct children of || ( ) be forbidden?
33
34 --
35 Ciaran McCreesh
36 Mail : ciaranm at ciaranm.org
37 Web : http://ciaranm.org/
38 Paludis, the secure package manager : http://paludis.pioto.org/

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour Simon Stelling <blubb@g.o>
Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour Thomas de Grenier de Latour <degrenier@×××××××××××.fr>
Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour "Kevin F. Quinn" <kevquinn@g.o>
Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour Carsten Lohrke <carlo@g.o>