1 |
On Mon, 2009-04-06 at 19:29 +0200, Michael Haubenwallner wrote: |
2 |
[snip] |
3 |
> Needless to say that "first EPREFIX" could be empty - it would be a |
4 |
> Gentoo Linux box then, most likely the developer's desktop. |
5 |
|
6 |
i quick-and-dirty tried this once, and it seems to work - can't make |
7 |
promises though ;) |
8 |
|
9 |
> |
10 |
> How that could work: |
11 |
> *) Each EPREFIX does have its private compiler wrapper, adding its own |
12 |
> path list (include, linktime, runtime). |
13 |
|
14 |
that wrapper is implemented already in sys-apps/prefix-chain-utils. |
15 |
although at the moment it is activated (by installing gcc-config) only |
16 |
if _not_ specifying --minimal to prefix-chain-setup. gcc-config requires |
17 |
a local portage instance to be installed. also the asumption here is, |
18 |
that if --minimal is given the target EPREFIX will be some sort of |
19 |
"cross" EPREFIX (like winnt fex), which uses a compiler from somewhere |
20 |
which knows how to handle the target prefix correctly. |
21 |
|
22 |
> *) Each EPREFIX does have its private etc/profile, which calls its |
23 |
> parent's etc/profile and prepends its own PATH (at least), to become |
24 |
> useable. |
25 |
|
26 |
this one is implemented in baselayout already, as you have seen in my |
27 |
patch... |
28 |
|
29 |
note that the "parent" prefix does not need any modification for |
30 |
prefix-chaining to work (so it does not need to know anything about it - |
31 |
as it is the case with EROOT=/ - since, of course, portage-main does not |
32 |
know... :)). although when setting up a --minimal prefix-chain, at least |
33 |
portage has to have USE="prefix-chaining" to be able to merge to EPREFIX |
34 |
while paying attention to READONLY_EPREFIX'es. |
35 |
baselayout will get USE=prefix-chaining from prefix-chain-setup anyway, |
36 |
and only the local baselayout needs to know - so nothing to keep in mind |
37 |
here. |
38 |
|
39 |
> |
40 |
> Now for cross-prefix: |
41 |
> Although it should be possible, there is no real need to have portage |
42 |
> installed in each of the EPREFIXes. Instead, use $EPREFIX to tell |
43 |
> portage which EPREFIX actually to manage, meaning what to start with for |
44 |
> dependency-tree calculation. |
45 |
> Eventually, there could be a wrapper around emerge and portageq in each |
46 |
> EPREFIX to avoid the need to have the environment variable being set. |
47 |
|
48 |
As of now, EPREFIX is set only if there is no local portage installed, |
49 |
which means that portage needs to be told where to merge to. Also this |
50 |
works around another problem: currently my wrapper around parity (the |
51 |
winnt compiler) adds $EPREFIX paths to the compiler and linker command |
52 |
line from the environment. Since parity is installed *somewhere* (in any |
53 |
other prefix in the chain), and does not know about EPREFIX at merge |
54 |
time, i can see no other way to do it ATM - any ideas? |
55 |
|
56 |
> |
57 |
> And the portage instance in use does know where to use its $BASH and $MV |
58 |
> from - known as BPREFIX already. |
59 |
|
60 |
if DEPENDs are taken from another prefix, portage does _not_ know, since |
61 |
they are not installed locally - but grobian fixed that already, so |
62 |
nothing to worry about. in the end it shouldn't matter *where* bash and |
63 |
mv are taken from, as long as they are there :) and since portage |
64 |
normally DEPENDS on those things, they should be guaranteed to be merged |
65 |
somewhere in the EPREFIX chain - so i can't imagine a setup where bash |
66 |
and mv could be taken from somewhere outside the chain (i.e. gentoo |
67 |
main, or even worse: some other system (interix, ...?)). |
68 |
|
69 |
> |
70 |
> Don't want to talk about cross- or multilib-compiling here yet. |
71 |
|
72 |
cross- in the sense i'm needing it for winnt is implemented just by not |
73 |
merging gcc-config and a local portage to the chained prefix. this - as |
74 |
i said above - requires the "cross" compiler to be able to handle the |
75 |
target prefix (listen to $EPREFIX (?), etc.), since there is no local |
76 |
wrapper adding EPREFIX paths. |
77 |
|
78 |
Cheers, Markus |
79 |
|
80 |
> |
81 |
> We already know that even it is ambitious, it is not ambiguous. |
82 |
> |
83 |
> /haubi/ |