Gentoo Archives: gentoo-dev

From: Jason Rhinelander <jason@××××××××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] ebuild optional dependencies question
Date: Mon, 18 Oct 2004 21:38:31
Message-Id: 417437D4.8060806@gossamer-threads.com
In Reply to: Re: [gentoo-dev] ebuild optional dependencies question by Ciaran McCreesh
1 Ciaran McCreesh wrote:
2
3 > Can't you solve this with blocking versions?
4
5 I don't see how - I made a (fictitious) DBD-mysql-2.9005 ebuild (I
6 currently have 2.9004), and tried changing my mysql ebuild to:
7
8 PDEPEND="!<dev-perl/DBD-mysql-2.9005"
9
10 But that neither pulled in 2.9005 nor blocked the emerge. I tried
11 throwing it into RDEPEND, which (expectedly) blocks the emerge entirely
12 - but emerging DBD-mysql /before/ mysql won't work, and the whole thing
13 is wrong anyway because DBD-mysql is in no way a run-time dependency or
14 blocker of mysql.
15
16 I suppose a specific version requirement could be added to DBD-mysql,
17 but this wouldn't be "correct" either as the newer DBD-mysql does *not*
18 require a newer mysql. Alternatively, every ebuild <2.9004 could block
19 >=mysql-4.1 - but that is quite a bit more maintenance to solve this
20 problem.
21
22 I did notice after I sent earlier e-mail that the mysql-4.0.21 ebuild
23 uses the selinux USE flag only in RDEPEND, so I concluded that USE-flags
24 that exist only in DEPEND's are a somewhat necessary evil and added a
25 "ruby? (...)" to PDEPEND.
26
27 That said, USE=ruby has *no* impact on how MySQL is built, and as such
28 also seems "wrong" - and I wonder how many other, similar cases exist.
29 However, having portage upgrade my DBD-mysql when I emerge mysql would
30 be a very nice feature, and keep a blocker from happening - which is
31 never a nice thing.
32
33 To that end, I wonder if it might be useful to expand the var?, !var?,
34 etc. syntax in DEPEND's to allow not just use-flags for 'var', but also
35 package atoms, allowing for syntax such as:
36
37 cat-a/package? ( >=cat-a/package-1.2 )
38 =cat-b/packb-1*? ( >=cat-b/packb-1.2 )
39 >=cat-b/packb-2? ( >=cat-b/packb-2.4 )
40
41 Currently this is invalid, but it would appear to be an elegant solution
42 to this problem, and wouldn't appear to break anything (aside from old
43 portage versions).
44
45 -- Jason Rhinelander
46 -- Gossamer Threads, Inc.
47
48 --
49 gentoo-dev@g.o mailing list