From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/, catalyst/base/
Date: Fri, 18 Apr 2014 16:52:23 +0000 (UTC) [thread overview]
Message-ID: <1397839835.4ed44b55ac0d9aa773f8a79c5ded8df08f1eef1b.dol-sen@gentoo> (raw)
commit: 4ed44b55ac0d9aa773f8a79c5ded8df08f1eef1b
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 30 23:56:02 2013 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Fri Apr 18 16:50:35 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=4ed44b55
modules/generic_stage_target.py, Create SOURCE_MOUNTS_DEFAULTS
Similarly to TARGET_MOUNTS_DEFAULTS this is a temporary location.
This will simplify the migration to being fully configurable.
It also simplifies initialization somewhat.
---
catalyst/base/stagebase.py | 24 ++++++++++++++----------
catalyst/defaults.py | 9 +++++++++
2 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 0e9b84f..31b5779 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -13,7 +13,7 @@ from catalyst.support import (CatalystError, msg, file_locate, normpath,
from catalyst.base.targetbase import TargetBase
from catalyst.base.clearbase import ClearBase
from catalyst.base.genbase import GenBase
-from catalyst.defaults import TARGET_MOUNT_DEFAULTS
+from catalyst.defaults import TARGET_MOUNT_DEFAULTS, SOURCE_MOUNT_DEFAULTS
from catalyst.lock import LockDir
from catalyst.fileops import ensure_dirs, pjoin
from catalyst.base.resume import AutoResume
@@ -194,15 +194,19 @@ class StageBase(TargetBase, ClearBase, GenBase):
""" Setup our mount points """
# initialize our target mounts.
self.target_mounts = TARGET_MOUNT_DEFAULTS.copy()
- if "snapcache" in self.settings["options"]:
- self.mounts=["proc", "dev", 'portdir', 'distdir', 'port_tmpdir']
- self.mountmap={"proc":"/proc", "dev":"/dev", "pts":"/dev/pts",
- "portdir":normpath(self.settings["snapshot_cache_path"]+"/" + self.settings["repo_name"]),
- "distdir":self.settings["distdir"],"port_tmpdir":"tmpfs"}
- else:
- self.mounts=["proc","dev", "distdir", "port_tmpdir"]
- self.mountmap={"proc":"/proc", "dev":"/dev", "pts":"/dev/pts",
- "distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"}
+
+ self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+ # initialize our source mounts
+ self.mountmap = SOURCE_MOUNT_DEFAULTS.copy()
+ # update them from settings
+ self.mountmap["distdir"] = self.settings["distdir"]
+ self.mountmap["portdir"] = normpath("/".join([
+ self.settings["snapshot_cache_path"],
+ self.settings["repo_name"],
+ ]))
+ if "snapcache" not in self.settings["options"]:
+ self.mounts.remove("portdir")
+ #self.mountmap["portdir"] = None
if os.uname()[0] == "Linux":
self.mounts.append("devpts")
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 11cecb3..27bcff4 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -94,6 +94,15 @@ TARGET_MOUNT_DEFAULTS = {
"proc": "/proc",
}
+SOURCE_MOUNT_DEFAULTS = {
+ "dev": "/dev",
+ "devpts": "/dev/pts",
+ "distdir": None, # set from settings options
+ "portdir": None, # set from settings options
+ "port_tmpdir": "tmpfs",
+ "proc": "/proc",
+ }
+
# legend: key: message
option_messages = {
"autoresume": "Autoresuming support enabled.",
next reply other threads:[~2014-04-18 16:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 16:52 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-04-18 16:52 [gentoo-commits] proj/catalyst:3.0 commit in: catalyst/, catalyst/base/ Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-04-18 16:52 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2014-01-22 5:04 Brian Dolbec
2013-12-31 10:48 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397839835.4ed44b55ac0d9aa773f8a79c5ded8df08f1eef1b.dol-sen@gentoo \
--to=brian.dolbec@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox