Gentoo Archives: gentoo-dev

From: Fabio Erculiani <lxnay@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] [RFC] EAPI 5+: split PDEPEND introducing SDEPEND
Date: Sun, 02 Sep 2012 14:46:57
Message-Id: CAN3Atvqq9wm2MQn-VqddqcS_=Q9WYiBxS4N3ZforcAmW7VN7tQ@mail.gmail.com
1 Hi,
2 this is actually a fork of the HDEPEND thread (sorry for having
3 diverged that much there).
4 As I wrote in the other thread, the problem with PDEPEND is that there
5 are two (or more) semantics:
6
7 - PDEPENDs used as "suggestions" but yet being considered in the
8 depgraph and actually installed. Usually "suggestion" PDEPENDs are
9 just packages providing extra features, not strictly required for the
10 package to work at all.
11 - PDEPENDs used for breaking dependency cycles (no problem with that).
12
13 That is why I'd like to propose to introduce SDEPEND, with the
14 following, simple, semantics:
15 dependencies listed in SDEPEND are not required at build time nor
16 strictly at runtime and they just enable more features in the
17 installed application. There can be "use?" literals and by default,
18 PMS should not pull them in in the dependencies calculation if not
19 specifically asked (through argument or configuration file or else --
20 like it happens with binpkgs and --with-bdeps).
21
22 A bunch of advantages over GLEP 62:
23 - Simplicity (really, as in KISS). SDEPENDs are easier to understand
24 and deal with, both at PMS (code) and user levels. They are also
25 straightforward to use in ebuilds (dev) and through emerge (user). [1]
26 - The USE flags meaning doesn't really get "stretched" introducing
27 obscure, unknown and dangerous possible side effects when deployed in
28 the real(tm) world. I understand that there is some level of risk with
29 SDEPENDs as well, but we've seen them already in Exherbo and they seem
30 to work fine there (I've been told this).
31 - Doesn't preclude the implementation of GLEP 62 anyway. SDEPENDs are
32 just "suggested" dependencies after all!
33 - No need to introduce funky cache invalidation logic for PMS
34 aggressively using caching at several layers of their stack and that
35 guarantee a consistent depgraph for the installed pkgs repository as
36 well [2].
37 - Fixes the "dissociative identity disorder" of PDEPEND ;-).
38
39 Disadvantages:
40 - If SDEPEND contains USE flags, these are written in stone and cannot
41 be changed without a rebuild. This is generally fine for source
42 packages, a bit less for binpkgs, but not really a big deal IMO.
43 - Not as "elastic" as GLEP 62 USE flags, but neither *DEPENDs are
44 - mgorny will hate me (eheheheh)
45
46 Discuss.
47
48 [1] It took me more than 5 minutes to understand how GLEP 62 works in
49 practice and this is not really good to me, for a simple feature like
50 this.
51 [2] From GLEP 62 page: "and it is not strictly required that a package
52 manager must ensure that the dependency graph is still consistent
53 afterwards".
54 --
55 Fabio Erculiani

Replies