Gentoo Archives: gentoo-alt

From: Markus Duft <mduft@g.o>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] prefix chaining
Date: Wed, 25 Mar 2009 13:21:44
Message-Id: 1237983571.28894.10.camel@localhost
In Reply to: Re: [gentoo-alt] prefix chaining by Fabian Groffen
1 On Wed, 2009-03-25 at 11:43 +0100, Fabian Groffen wrote:
2 > On 25-03-2009 10:43:51 +0100, Markus Duft wrote:
3 > > Hi!
4 > >
5 > > i'm done working on my prefix-chaining project for now. i have
6 > > (attached) patches ready for commit (and 2 new packages, but that should
7 > > not matter to anyone anyway :))
8 > >
9 > > the one is a newer version of the portage patch i submitted lately, and
10 > > the other one patches baselayout, so that prefix chaining can work.
11 > >
12 > > for all these things i can say: they won't hurt anybody, as long as
13 > > there is no READONLY_EROOT set in make.conf, which should not be the
14 > > case ;) that's the trigger that activates all changes.
15 >
16 > I think READONLY_EROOT is a bad name/starting point. To make this
17 > "feature" generic you should go from READONLY_ROOT I guess. But I don't
18 > see what ROOT has to do with Prefix chaining anyway. From what you
19 > wrote before it seems like you run stuff from READONLY_EROOT, which is
20 > usually impossible/hard with ROOT != /
21
22 hmm, maybe you're right. actually the whole thing has not too much to do
23 with ROOT. i think the most correct one would be READONLY_EPREFIX, but
24 i'm unsure if that would be a good name. suggestions?
25
26 >
27 > > if there is no READONLY_EROOT, behaviour of all parts of portage and
28 > > baselayout should be exactly the same.
29 > >
30 > > ok to commit? maybe we could think about checking the portage patch into
31 > > the prefix-portage svn tree?
32 >
33 > Yes, but as I have indicated before, I like to understand what problem
34 > we're actually trying to solve here. And more importantly, I'd like to
35 > introduce this stuff in trunk instead of prefix if it is of generic use.
36 > But I really can't tell for the moment.
37
38 this stuff doesn't make any sense without prefix support, so i guess it
39 wont make it into main until the prefix tree is merged there...
40
41 >
42 > > since i haven't commented on the baselayout patch yet, i'll do it here
43 > > (the portage patch is basically the same as the one i submitted lately,
44 > > with small improvements):
45 > >
46 > > etc/env.d/00basic:
47 > > * added EPREFIX variable, since if the currently used portage
48 > > instance comes from a chained prefix, portage needs to be
49 > > explicitly informed of the EPREFIX. this should not disturb
50 > > anybody, since it can be overridden after starting the prefix
51 > > again...
52 >
53 > This is bad, and I would call it a blocker.
54
55 hm. the problem is the following: i can use a portage installed into
56 another EPREFIX, which forces me to set EPREFIX for the "child" eprefix,
57 if i want to use portage (i want to :)). instead of setting it in env.d
58 i could set it in startprefix (that is a script installed by
59 prefix-chain-utils, one of the new packages i'll add for
60 prefix-chaining), and only if i'm unable to detect a local portage.
61 would that help? that would eliminate EPREFIX in 99% of all cases, since
62 the prefix-chain-setup script used to bootstrap a chained prefix
63 installs portage, unless --minimal is given (which i will do for winnt
64 chained prefixes - and maybe in the future for other cross-chained
65 eprefixes (for example cross-multilib-abi on a linux system...?)). could
66 you live with that?
67
68 >
69 > > etc/profile:
70 > > * the profile now sources all profiles (recursively) of all
71 > > parent prefixes in the chain.
72 > > * if we are in a chained environment, some variables need
73 > > speacial treatment, since i want some of the chained envs to
74 > > be there in the current prefix. (PATH, MANPATH and in some
75 > > cases PKG_CONFIG_PATH. others may come...)
76 > > * if we are in a chained environment, don't append /usr/.. and
77 > > /... paths to PATH, unless we're the top level prefix in the
78 > > chain (which behaves the same as if there where no chain).
79 >
80 > why?
81
82 with the current situation i would end up with a path like this:
83
84 /my/chained/eprefix/bin:...:/usr/bin:/bin:/my/parent/prefix/bin:...:/usr/bin:/bin
85
86 but i want: (to find executable from prefixes before the system of
87 course)
88
89 /my/chained/eprefix/bin:...:/my/parent/prefix/bin:...:/usr/bin:/bin
90
91 so only the last prefix in a chain (when there is no chain, the only
92 EPREFIX in play behaves like the last of the chain - it actually is -
93 the chain is just exactly one EPREFIX long :)) sets system wide dirs
94 into PATH.
95
96 >
97 > > * the last hunk is for correctly setting the chained variables
98 > > which i listed above (PATH, MANPATH, etc.).
99 >
100 > > If nobody has objections, i'll commit. i'll wait a few hours before
101 > > committing.
102 >
103 > I don't feel good about this, and I think it will break.
104
105 what exactly will break? i tested it at least in i hope most relevant
106 parts, to ensure that it doesn't break. however - of course - i can't
107 promise.
108
109 Cheers, Markus
110
111 >
112 >

Replies

Subject Author
Re: [gentoo-alt] prefix chaining Fabian Groffen <grobian@g.o>