On Sat, Dec 28, 2013 at 05:57:09PM -0800, Brian Dolbec wrote: > +# temporary location. It will be moved to a > +# new defaults file in a later comit
Hopefully those later commits will land, but maybe they won't. I'd
rather comment on future goals in the Git commit instead of in the
source code.
> + # initialize our target mounts.
> + # later I plan to make these configurable so the
> + # defaults can be easily overridden if desired.
> + self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy()
See above about future goals in the Git commit.
> - self.mounts.append("/var/log/portage")
> -
> self.mountmap["/var/log/portage"]=self.settings["port_logdir"]
> - self.env["PORT_LOGDIR"]="/var/log/portage"
> + self.mounts.append("port_logdir")
> +
> self.mountmap["port_logdir"]=self.settings["port_logdir"]
> +
> self.env["PORT_LOGDIR"]=self.target_mounts["port_logdir"]
Looks good. The mounts/mountmap changes are orthogonal to the
target_mounts addition, but it's probably not worth splitting them out
into a separate fixup.
> def mount_safety_check(self):
> …
> def bind(self):
> …
> @@ -935,26 +962,25 @@ class generic_stage_target(generic_target):
> myrevmounts.reverse()
> """ Unmount in reverse order for nested bind-mounts """
> …
Hooray, sanity :).
> - self.mounts.append("/tmp/stage1root/proc")
> - self.mountmap["/tmp/stage1root/proc"]="/proc"
> + self.mounts.append("stage1root/proc")
> + self.target_mounts["stage1root/proc"] = "/tmp/stage1root/proc"
> + self.mountmap["stage1root/proc"]="/proc"
Hmm. I'm not how this is handled at the moment, but don't we want:
mount -t proc none /tmp/stage1root/proc
instead of:
mount --bind /proc /tmp/stage1root/proc
The handbook is currently using --rbind as well [1].
Maybe food for a future series :p.
Cheers,
Trevor
[1]:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap1_sect3
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
signature.asc
Description: OpenPGP digital signature
