Gentoo Archives: gentoo-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Dynamic SLOTs
Date: Fri, 06 Aug 2004 23:54:28
Message-Id: 200408070857.29263.jstubbs@gentoo.org
In Reply to: Re: [gentoo-dev] Dynamic SLOTs by Paul de Vrieze
1 On Saturday 07 August 2004 00:18, Paul de Vrieze wrote:
2 > On Friday 06 August 2004 14:41, Jason Stubbs wrote:
3 > > On Friday 06 August 2004 20:56, Paul de Vrieze wrote:
4 > > > On Saturday 31 July 2004 08:46, Mike Frysinger wrote:
5 > > > > On Saturday 31 July 2004 12:09 am, Jason Stubbs wrote:
6 > > > > > I added support for USE-based SLOTs to
7 > > > > > support the third and fourth.
8 > > > >
9 > > > > i know this is off topic of your e-mail, but could you go more into
10 > > > > depth on this ?
11 > > > > CHOST / CCHOST / cross compiling dynamic SLOTs interest embedded very
12 > > > > much -mike
13 > > >
14 > > > I'm working on my own portage_ng version. It includes a c++ parser that
15 > > > replaces the bash cruft, is a lot faster, and parses most existing
16 > > > ebuilds. (compilation etc. still happens in bash) (It does not allow at
17 > > > all dynamic behaviour on the toplevel, but it will include a much more
18 > > > flexible dependency structure. On top of that the parser itself does
19 > > > not (yet at least) perform the variable substitution, so the variables
20 > > > are still available for reading. Once I get to that point I will also
21 > > > include some kind of dynamic slot/ multislot feature based on some
22 > > > conditions. It will certainly allow multiple installation of the same
23 > > > version of the same package (think crosscompiling, php for apache1 and
24 > > > apache2) given that they have different MULTISLOT values
25 > >
26 > > Are you going to share information or just offer another sales pitch? For
27 > > example, what algorithm(s) are you going use to handle the following?
28 > >
29 > > pkg-a-1.0:SLOT="foo? ( 2 ) !foo ( 1 )"
30 > > pkg-a-1.1:SLOT="foo? ( 1 ) !foo ( 2 )"
31 > > pkg-b-1.0:DEPEND="foo? ( pkg-a:2 )"
32 > > pkg-c-1.0:DEPEND="pkg-b[foo]"
33 > > USE="-foo" emerge pkg-c
34 >
35 > For one thing, I'm going to introduce a prefix based notation (similar to
36 > lisp) for dependencies, with the current syntax as a shortcut. I'm not yet
37 > very clear on how the MULTISLOT will work exactly, but variable based
38 > MULTISLOT should not be any problem
39
40 The notation used shouldn't have any baring on what is actually being done.
41
42 > > How about if pkg-a is installed in both slot 1 and slot 2 and the user
43 > > issues "emerge -u pkg-a" ?
44 >
45 > I have not thought about this yet at all. Probably update both, or give a
46 > big fat warning/error message
47 >
48 > > How about if we add pkg-d-1.0:DEPEND="pkg-a[-foo]" and the user issues
49 > > "emerge pkg-c pkg-d" ?
50 >
51 > Then we check whether pkg-a[-foo] can be satisfied in the current installed
52 > tree. If it can it will be (possibly by remerging it), else there is a
53 > conflict and an error message will be produced
54
55 But pkg-c may change what's in the installed package tree...
56
57 > > All those have a definite solution, but doing it in code that isn't as
58 > > slow as hell is another matter.
59 >
60 > Well, I'll try to work on it with fast code
61
62 The code isn't what needs to be fast. It's the algorithm used that are
63 important. I'm not so worried about ARCH-based or KV-based SLOTs any longer
64 as I've figured out how they can be handled cleanly without slowing down
65 everything else. On the other hand, introducing USE-based SLOTs makes
66 everything about a package variable. When atoms can specify any of that
67 variation, it becomes horrifically complex.
68
69 I, too, am working on a portage-ng. It's called portage. Presently, I'm near
70 finishing a new dependency resolver that supports:
71 * Ranged deps
72 * USE-based atoms
73 * SLOT-based atoms
74 * SLOT upgrades
75 * Full circular dependency support
76
77 Even with all that, a full dependency tree is built with all circular
78 dependencies resolved in about 6 seconds, where currently emerge takes about
79 2 seconds. I can't see a way to get USE-based SLOTs in without at least
80 doubling that figure (which is incidentally the time that 2.0.50 took). I'm
81 open to suggestions on how to get around it.
82
83 Regards,
84 Jason Stubbs
85
86 --
87 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Dynamic SLOTs Paul de Vrieze <pauldv@g.o>
Re: [gentoo-dev] Dynamic SLOTs Chris Bainbridge <chrb@g.o>