1 |
On Sat, Dec 28, 2013 at 05:57:09PM -0800, Brian Dolbec wrote: |
2 |
> +# temporary location. It will be moved to a |
3 |
> +# new defaults file in a later comit |
4 |
|
5 |
Hopefully those later commits will land, but maybe they won't. I'd |
6 |
rather comment on future goals in the Git commit instead of in the |
7 |
source code. |
8 |
|
9 |
> + # initialize our target mounts. |
10 |
> + # later I plan to make these configurable so the |
11 |
> + # defaults can be easily overridden if desired. |
12 |
> + self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy() |
13 |
|
14 |
See above about future goals in the Git commit. |
15 |
|
16 |
> - self.mounts.append("/var/log/portage") |
17 |
> - self.mountmap["/var/log/portage"]=self.settings["port_logdir"] |
18 |
> - self.env["PORT_LOGDIR"]="/var/log/portage" |
19 |
> + self.mounts.append("port_logdir") |
20 |
> + self.mountmap["port_logdir"]=self.settings["port_logdir"] |
21 |
> + self.env["PORT_LOGDIR"]=self.target_mounts["port_logdir"] |
22 |
|
23 |
Looks good. The mounts/mountmap changes are orthogonal to the |
24 |
target_mounts addition, but it's probably not worth splitting them out |
25 |
into a separate fixup. |
26 |
|
27 |
> def mount_safety_check(self): |
28 |
> … |
29 |
> def bind(self): |
30 |
> … |
31 |
> @@ -935,26 +962,25 @@ class generic_stage_target(generic_target): |
32 |
> myrevmounts.reverse() |
33 |
> """ Unmount in reverse order for nested bind-mounts """ |
34 |
> … |
35 |
|
36 |
Hooray, sanity :). |
37 |
|
38 |
> - self.mounts.append("/tmp/stage1root/proc") |
39 |
> - self.mountmap["/tmp/stage1root/proc"]="/proc" |
40 |
> + self.mounts.append("stage1root/proc") |
41 |
> + self.target_mounts["stage1root/proc"] = "/tmp/stage1root/proc" |
42 |
> + self.mountmap["stage1root/proc"]="/proc" |
43 |
|
44 |
Hmm. I'm not how this is handled at the moment, but don't we want: |
45 |
|
46 |
mount -t proc none /tmp/stage1root/proc |
47 |
|
48 |
instead of: |
49 |
|
50 |
mount --bind /proc /tmp/stage1root/proc |
51 |
|
52 |
The handbook is currently using --rbind as well [1]. |
53 |
|
54 |
Maybe food for a future series :p. |
55 |
|
56 |
Cheers, |
57 |
Trevor |
58 |
|
59 |
[1]: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap1_sect3 |
60 |
|
61 |
-- |
62 |
This email may be signed or encrypted with GnuPG (http://www.gnupg.org). |
63 |
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy |