1 |
On Friday 23 April 2004 11:04 am, Paul Smith wrote: |
2 |
> What I want to be able to do is this: have one (or more) Portage |
3 |
> installations, or "images", on a system. An "image" is a complete |
4 |
> Portage system, but "virtualized" by having it rooted somewhere besides |
5 |
> /. Suppose you had a directory like /opt/portage, and under there you |
6 |
> had p1, p2, p3, etc. which were Portage images. Then underneath each |
7 |
> one of those would be, for example, an etc/portage directory, and a |
8 |
> var/log/emerge.log, and a var/db/pkg, etc. which contained Portage |
9 |
> control files/databases for only that image. |
10 |
|
11 |
*ears perk up* |
12 |
keep me posted on your success here. what i would like to do with portage |
13 |
varies greatly from what you seem to want, but it depends on the exact same |
14 |
functionality, with slightly different limitations. |
15 |
|
16 |
what /i/ would love to see in portage is true multilib compatibility for |
17 |
archs with a bi-arch toolchain, with seperate dependency trees for each |
18 |
bitdepth that is supported. in the case of amd64, that would mean seperate |
19 |
dependency trees for 64bit and 32bit. |
20 |
|
21 |
right now, on amd64, we are as non-compliant as it can get in regards to |
22 |
standards and it makes quite a few things difficult sometimes... but a lot of |
23 |
things want to install to lib and not lib64, and nobody really wants to |
24 |
bother rewriting econf as well as any ebuild that doesn't use it when we dont |
25 |
even have support for the multiple dependency trees that would justify such |
26 |
work. |
27 |
|
28 |
another oddity brought on by the bi-arch toolchain problem that would |
29 |
complicate things even more is that unlike your cross-compiler case, in a |
30 |
multilib situation you would need cross-tree dependencies and everything from |
31 |
both trees will be installed to the same ROOT, using the same BUILDROOT. so |
32 |
this part of your work probably wont help the multilib case (dont mind me, |
33 |
i'm not a python coder and i'm already thinking about how to hack whatever |
34 |
you end up working on to do what i want it to ^_^ ). we would need to have |
35 |
only one gcc, glibc, etc... and it would have to be 64bit on amd64. on amd64, |
36 |
the 64bit toolchain would need to be used to build anything in the 32bit dep |
37 |
tree, only with the forced addition of -m32 everywhere. |
38 |
|
39 |
> Now when you want to install a new package, before you can run emerge |
40 |
> you need to choose a "build", or host, image and a "destination", or |
41 |
> target, image. We'll say that the destination is selected by the value |
42 |
> of ROOT, and the build image is selected by the value of BUILDROOT. |
43 |
|
44 |
i can also see any work you do here helping out in the multilib case, if it's |
45 |
taken into account. however, instead of ROOT and BUILDROOT there would have |
46 |
to be a way to handle ROOTARCH and BUILDROOTARCH, or something similar... in |
47 |
the multilib case, at least for amd64, we would want 32bit libraries to end |
48 |
up in /lib, and 32bit binaries to have the suffix "32". and the binary |
49 |
package itself would have to decide it's own arch... there would be no other |
50 |
way of knowing what the package contains without unpacking it. and then we |
51 |
wouldn't know if the package doesn't contain anything arch-specific we could |
52 |
test... hmm. |
53 |
|
54 |
> Obviously the simplest case is where both ROOT and BUILDROOT are "/" |
55 |
> (which would be the default value). This represents the standard |
56 |
> Portage usage. |
57 |
|
58 |
for the multilib case, this is anything but simple :'( |
59 |
|
60 |
> The idea is you could create new Portage images quite independently from |
61 |
> your real system. In particular, the new Portage image could be for a |
62 |
> completely different architecture: cross-compilers could be installed in |
63 |
> the "build" image, then used to build and install into the |
64 |
> "destination". |
65 |
|
66 |
i'm much more interested in the ability to use the amd64 native 64bit |
67 |
toolchain to build 64bit, 32bit, and bi-arch installs without use of a |
68 |
cross-compiler or having to drop into a 32bit chroot. :) |
69 |
|
70 |
> The above is not such a big deal; it could play relatively nicely I |
71 |
> think with the current Portage. We just need to change references to |
72 |
> fully-qualified paths with variable-qualified paths based on the |
73 |
> BUILDROOT value. |
74 |
|
75 |
for the multilib case we would need additional variables to decide where |
76 |
things go, and such. :/ |
77 |
|
78 |
> However, the problem of the current handling of DEPEND vs. RDEPEND is |
79 |
> not so simple to resolve. It looks like DEPEND and RDEPEND are targeted |
80 |
> at a very different scenario than the one I outline above. If ROOT is |
81 |
> set, it appears that Portage looks for DEPEND packages on the "real" |
82 |
> system and RDEPEND packages in the ROOT image. Also, all the Portage |
83 |
> database info, logs, etc. is kept in the "real" root, not the ROOT root. |
84 |
> I guess I'm not quite clear on what scenario this setup actually |
85 |
> supports? Can anyone give me a quick use-case? It almost seems like |
86 |
> you're trying to support creating non-Portage-based images from a |
87 |
> Portage-based image... that's not something I'm really that interested |
88 |
> in. |
89 |
|
90 |
multilib will probably also require an arch-less or arch-of-choice dependency |
91 |
that specifies when a package could really care less what arch the dependency |
92 |
is. scripts and interpreted languages dont give a damn what arch the shell |
93 |
and interpreter are, for example. also, for a functional install, a multilib |
94 |
system probably doesnt want two seperate copies of certain things installed |
95 |
to ROOT... i'm pretty sure we only need one kernel logger, init, bash, etc. |
96 |
i'd say most if not all of what would appear in a stage3 that isn't a library |
97 |
(or glibc, which is multilib aware and will install as 32bit and 64bit if |
98 |
told to). |
99 |
|
100 |
so, also, three dependency trees... where the two bi-arch trees include deps |
101 |
from a third tree containing stuff that shouldn't be installed twice? *shrug* |
102 |
|
103 |
> In my environment the above would not be correct: both DEPEND and |
104 |
> RDEPEND packages would have to appear in the ROOT image (remember that |
105 |
> the BUILDROOT and ROOT could be completely different architectures!) |
106 |
|
107 |
ditto. kinda. |
108 |
|
109 |
> SO! Does any of that make sense? Is there some way we can rationalize |
110 |
> the handling of DEPEND/RDEPEND? Maybe something like if BUILDROOT is |
111 |
> set then DEPEND/RDEPEND are both looked for in the ROOT? I don't really |
112 |
> like that as it seems like "special magic" that's kind of difficult to |
113 |
> understand, but it is backward-compatible. |
114 |
|
115 |
i'm thinking that if you take into consideration just cross-compiling, there |
116 |
would have to be additional hacks added later on if portage ever wants to |
117 |
support multilib. but if you take multilib into consideration just a little |
118 |
while working on cross-compiling, we might end up getting multilib support |
119 |
almost for free. and if that happens, dude i will love you for LIFE. |
120 |
|
121 |
you have no idea how much of a PITA it is to support 32bit anything in |
122 |
gentoo. if we were multilib compliant, you could almost install packages |
123 |
from x86 gentoo on amd64 without modification. all we would need is some |
124 |
editing to the ebuild install to rename 32bit apps, perhaps rename env.d |
125 |
entries, perhaps add a script in post-install for the real name that will |
126 |
run the 32bit version... etc. similar workarounds could be provided for |
127 |
64bit installs to make sure that /all/ 64bit libs end up in a lib64 |
128 |
directory... |
129 |
|
130 |
hmm. yeah. dont mind me for thinking out loud to the list, but it would |
131 |
definately make me VERY happy to see such functionality in portage. you have |
132 |
no idea... even after all the work it would take to work around the current |
133 |
UGLY FREAKING HACKS we use and any additional work needed to provide |
134 |
compatibility/migration for our current hacked-as-fsck ugly-as-sin installs. |
135 |
|
136 |
|
137 |
Travis Tilley <lv@g.o> |
138 |
Gentoo/AMD64 Developer |
139 |
|
140 |
-- |
141 |
gentoo-dev@g.o mailing list |