Gentoo Archives: gentoo-dev

From: Ben de Groot <yngwin@g.o>
To: gentoo-dev@l.g.o
Cc: axs@g.o, Micha?? G??rny <mgorny@g.o>
Subject: Re: [gentoo-dev] example conversion of gentoo-x86 current deps to unified dependencies
Date: Sun, 16 Sep 2012 07:40:30
Message-Id: CAB9SyzQLUVPNoQdaKC_pk0iq9Kd+8xU2dR1zmvR45CGQAfGe3g@mail.gmail.com
In Reply to: [gentoo-dev] example conversion of gentoo-x86 current deps to unified dependencies by Brian Harring
1 On 16 September 2012 09:20, Brian Harring <ferringb@×××××.com> wrote:
2 > On Sun, Sep 16, 2012 at 12:03:36AM +0200, Micha?? G??rny wrote:
3 >> On Sat, 15 Sep 2012 13:33:18 -0700
4 >> Brian Harring <ferringb@×××××.com> wrote:
5 >> > To demonstrate the gain of this, we basically take the existing
6 >> > tree's deps, and re-render it into a unified DEPENDENCIES form.
7 >>
8 >> But in order to do this, we first have to decide exactly what kind
9 >> of dependencies do we want to have. Then convert the tree to
10 >> a separate-variable form with new dependencies. Then we can compare
11 >> it with the DEPENDENCIES form and decide which one is better.
12 >
13 > Funny you mentioned that, I just finished tweaking pquery to generate
14 > real world example unified dependencies; these *are* accurate, just to
15 > be clear.
16 >
17 > Dumps are at
18 > http://dev.gentoo.org/~ferringb/unified-dependencies-example/ .
19 >
20 > Herds, if you want to see what your pkgs would look like, look at
21 > http://dev.gentoo.org/~ferringb/unified-dependencies-example/herds/ .
22 >
23 > If you'd like to see an *example effect* it has on what gets displayed
24 > to the user (aka, after all major use conditionals are stripped), look
25 > at
26 > http://dev.gentoo.org/~ferringb/unified-dependencies-example/user-visible.txt
27 > ; warning, that's a 55MB file. The syntax in use there isn't great,
28 > but as said, it's an example.
29 >
30 > Total cache savings from doing this for a full tree conversion, for
31 > our existing md5-cache format is 2.73MB (90 byes per cache entry).
32 > Calculating the savings from the ebuild/eclass standpoint is dependent
33 > on how the deps are built up, so I skipped that.
34 >
35 > The algorithim used is fairly stupid, but reasonably effectively;
36 > essentially it intersects the top level of each individual type of
37 > dep, breaking out common groupings.
38 >
39 > In other words, it won't pick up this:
40 > DEPEND="x? ( dev-util/diffball dev-util/bsdiff )"
41 > RDEPEND="x? ( dev-util/diffball )"
42 >
43 > and convert it into thus
44 > DEPENDENCIES="
45 > dep:build,run? (
46 > x? (
47 > dev-util/diffball
48 > dep:run? (
49 > dev-util/diffball
50 > )
51 > )
52 > )"
53 >
54 > Additionally, the form used here makes *no assumption about default
55 > context*; in any final solution we use, a default context would be
56 > wise- say build,run. Again, an example of what I mean.
57 >
58 > If we said "in the absense of a context, the default is dep:build,run"
59 > the following:
60 >
61 > DEPEND="dev-util/diffball dev-util/bsdiff"
62 > RDEPEND="dev-util/diffball de-vutil/bsdiff x? ( sys-apps/pkgcore )"
63 > PDEPEND="dev-python/snakeoil"
64 >
65 > would be:
66 > DEPENDENCIES="
67 > dev-util/diffball
68 > dev-util/bsdiff
69 > dep:run? ( x? ( sys-apps/pkgcore ) )
70 > dep:post? ( dev-python/snakeoil )
71 > "
72 >
73 > The quicky algo I used assumes no default context, thus it writes
74 > this:
75 > DEPENDENCIES="
76 > dep:build,run? (
77 > dev-util/diffball
78 > dev-util/bsdiff
79 > )
80 > dep:run? ( x? ( sys-apps/pkgcore ) )
81 > dep:post? ( dev-python/snakeoil )
82 > "
83 >
84 > Etc.
85 >
86 > ~harring
87 >
88
89 Thanks. I have given it a quick overview for the qt herd. I still
90 don't see what using DEPENDENCIES adds to what we do now with separate
91 *DEPEND variables. I see no convincing reason to change what we do.
92
93 As I've said before on IRC, we need a good costs/benefits overview.
94 Right now I only see costs (migrating ebuilds and eclasses) and no
95 benefits.
96
97 --
98 Cheers,
99
100 Ben | yngwin
101 Gentoo developer
102 Gentoo Qt project lead, Gentoo Wiki admin

Replies