1 |
I know this is long. Hopefully it's sufficiently interesting to justify |
2 |
the length :). Hopefully some of you can find the time to wade through |
3 |
it. |
4 |
|
5 |
|
6 |
%% Chris Gianelloni <wolf31o2@g.o> writes: |
7 |
|
8 |
>> Looking the code, it's looking for _BOTH_ /var/cache/edb _AND_ |
9 |
>> $ROOT/var/cache/edb. |
10 |
|
11 |
cg> I would think that is correct, to test for both DEPEND _AND_ |
12 |
cg> RDEPEND. The stuff in DEPEND would need to be in your REAL /, |
13 |
cg> whereas RDEPEND would need to be in $ROOT/. |
14 |
|
15 |
So, I've been looking at the latest CVS Portage code, especially in |
16 |
emerge, and I think I've much more completely grokked the distinction |
17 |
between "/" and ROOT, and DEPEND and RDEPEND now. |
18 |
|
19 |
It's become obvious to me that these distinctions aren't going to |
20 |
satisfy my requirements, unfortunately. |
21 |
|
22 |
I believe now that these capabilities really are solving a subset of the |
23 |
entire problem space, and my requirements are for a fully realized |
24 |
solution. |
25 |
|
26 |
What I want to be able to do is this: have one (or more) Portage |
27 |
installations, or "images", on a system. An "image" is a complete |
28 |
Portage system, but "virtualized" by having it rooted somewhere besides |
29 |
/. Suppose you had a directory like /opt/portage, and under there you |
30 |
had p1, p2, p3, etc. which were Portage images. Then underneath each |
31 |
one of those would be, for example, an etc/portage directory, and a |
32 |
var/log/emerge.log, and a var/db/pkg, etc. which contained Portage |
33 |
control files/databases for only that image. |
34 |
|
35 |
Now when you want to install a new package, before you can run emerge |
36 |
you need to choose a "build", or host, image and a "destination", or |
37 |
target, image. We'll say that the destination is selected by the value |
38 |
of ROOT, and the build image is selected by the value of BUILDROOT. |
39 |
|
40 |
|
41 |
Obviously the simplest case is where both ROOT and BUILDROOT are "/" |
42 |
(which would be the default value). This represents the standard |
43 |
Portage usage. |
44 |
|
45 |
Another situation would be where BUILDROOT is "/" and ROOT is something |
46 |
else. This is sort of represents the capability Portage has |
47 |
today... but not quite (see below). |
48 |
|
49 |
Then the most generic case would be where both values are set to |
50 |
something other than "/". In this situation the "real" system might not |
51 |
really be consulted at all: all the build tools: compilers, linkers, |
52 |
bison/yacc, etc. (including Portage itself!) would be installed in the |
53 |
"build" image, with all the stuff that is built being put into the |
54 |
"destination" image. |
55 |
|
56 |
The idea is you could create new Portage images quite independently from |
57 |
your real system. In particular, the new Portage image could be for a |
58 |
completely different architecture: cross-compilers could be installed in |
59 |
the "build" image, then used to build and install into the |
60 |
"destination". |
61 |
|
62 |
|
63 |
The above is not such a big deal; it could play relatively nicely I |
64 |
think with the current Portage. We just need to change references to |
65 |
fully-qualified paths with variable-qualified paths based on the |
66 |
BUILDROOT value. |
67 |
|
68 |
|
69 |
However, the problem of the current handling of DEPEND vs. RDEPEND is |
70 |
not so simple to resolve. It looks like DEPEND and RDEPEND are targeted |
71 |
at a very different scenario than the one I outline above. If ROOT is |
72 |
set, it appears that Portage looks for DEPEND packages on the "real" |
73 |
system and RDEPEND packages in the ROOT image. Also, all the Portage |
74 |
database info, logs, etc. is kept in the "real" root, not the ROOT root. |
75 |
I guess I'm not quite clear on what scenario this setup actually |
76 |
supports? Can anyone give me a quick use-case? It almost seems like |
77 |
you're trying to support creating non-Portage-based images from a |
78 |
Portage-based image... that's not something I'm really that interested |
79 |
in. |
80 |
|
81 |
One way I could understand this distinction being used is with binary |
82 |
packages: if you're installing a binary version of a package then you |
83 |
need to only check that its RDEPEND packages are installed, not the |
84 |
DEPEND packages, since it's already built. But, I don't think that's |
85 |
how it's intended to be used based on what I see. |
86 |
|
87 |
|
88 |
In my environment the above would not be correct: both DEPEND and |
89 |
RDEPEND packages would have to appear in the ROOT image (remember that |
90 |
the BUILDROOT and ROOT could be completely different architectures!) |
91 |
|
92 |
|
93 |
For my purposes I might need a different kind of depend, call it a |
94 |
"build DEPEND" or BDEPEND. This would be a set of packages that are |
95 |
needed in the BUILDROOT image in order to build the ROOT image. It would |
96 |
only contain host-based tools, I guess, that were needed for building: |
97 |
as above it would refer to compilers, cross-compilers, |
98 |
bison/yacc/lex-type tools, etc. This would be very cool, but maybe not |
99 |
critically important. |
100 |
|
101 |
|
102 |
SO! Does any of that make sense? Is there some way we can rationalize |
103 |
the handling of DEPEND/RDEPEND? Maybe something like if BUILDROOT is |
104 |
set then DEPEND/RDEPEND are both looked for in the ROOT? I don't really |
105 |
like that as it seems like "special magic" that's kind of difficult to |
106 |
understand, but it is backward-compatible. |
107 |
|
108 |
-- |
109 |
------------------------------------------------------------------------------- |
110 |
Paul D. Smith <psmith@××××××××××××××.com> HASMAT--HA Software Mthds & Tools |
111 |
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist |
112 |
------------------------------------------------------------------------------- |
113 |
These are my opinions---Nortel Networks takes no responsibility for them. |
114 |
|
115 |
-- |
116 |
gentoo-dev@g.o mailing list |