From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/targets/
Date: Tue, 31 Dec 2013 04:22:13 +0000 (UTC) [thread overview]
Message-ID: <1388462374.1e7d906277a89e247c9c16b617ef2912dfb16e2b.dol-sen@gentoo> (raw)
commit: 1e7d906277a89e247c9c16b617ef2912dfb16e2b
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: Tue Dec 31 03:59:34 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=1e7d9062
modules/generic_stage_target.py, Create SOURCE_MOUNTS_DEFAULTS
Similarly to TARGET_MOUNTS_DEFAULTS this will simplify
the migration to being fully configurable.
It also simplifies initialization somewhat.
---
catalyst/targets/generic_stage_target.py | 38 ++++++++++++++++++--------------
1 file changed, 22 insertions(+), 16 deletions(-)
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index d4cbc77..6634a08 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -22,6 +22,15 @@ TARGET_MOUNTS_DEFAULTS = {
"proc": "/proc",
}
+SOURCE_MOUNTS_DEFAULTS = {
+ "proc": "/proc",
+ "dev": "/dev",
+ "devpts": "/dev/pts",
+ "distdir": "/usr/portage/distfiles",
+ "portdir": "/usr/portage",
+ "port_tmpdir": "tmpfs",
+ }
+
# for convienience
pjoin = os.path.join
@@ -198,22 +207,19 @@ class generic_stage_target(generic_target):
""" Setup our mount points """
# initialize our target mounts.
self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy()
- if "SNAPCACHE" in self.settings:
- self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
- self.mountmap = {
- "proc": "/proc",
- "dev": "/dev",
- "devpts": "/dev/pts",
- "portdir": normpath("/".join([
- 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", "devpts":"/dev/pts",
- "distdir":self.settings["distdir"], "port_tmpdir":"tmpfs"}
+
+ self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
+ # initialize our source mounts
+ self.mountmap = SOURCE_MOUNTS_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:
+ self.mounts.remove("portdir")
+ #self.mountmap["portdir"] = None
if os.uname()[0] == "Linux":
self.mounts.append("devpts")
next reply other threads:[~2013-12-31 4:22 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-31 4:22 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-11-29 17:20 [gentoo-commits] proj/catalyst:master commit in: catalyst/targets/ Brian Dolbec
2017-11-22 15:52 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2017-03-16 22:57 Brian Dolbec
2017-03-11 7:07 Brian Dolbec
2017-03-10 18:38 Brian Dolbec
2017-03-09 10:02 Brian Dolbec
2017-03-09 9:39 Brian Dolbec
2015-11-12 16:24 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-11-21 1:33 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 20:12 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2015-01-01 5:59 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2015-02-26 19:25 Brian Dolbec
2015-01-01 5:59 Brian Dolbec
2015-01-01 5:59 Brian Dolbec
2014-09-11 3:08 Brian Dolbec
2014-09-02 23:10 Brian Dolbec
2014-09-02 7:12 Brian Dolbec
2014-09-02 5:54 Brian Dolbec
2014-09-02 5:54 Brian Dolbec
2014-09-02 2:43 Brian Dolbec
2014-09-02 2:43 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-15 14:56 Brian Dolbec
2014-06-14 5:58 Brian Dolbec
2014-06-14 5:58 Brian Dolbec
2014-05-05 19:17 [gentoo-commits] proj/catalyst:master " Brian Dolbec
2014-05-05 19:15 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-04-02 20:09 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-22 22:25 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-03-02 16:07 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 21:48 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-02-22 18:43 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-22 15:52 Brian Dolbec
2014-01-03 6:41 Brian Dolbec
2014-01-03 6:12 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-03 5:03 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-02 0:04 Brian Dolbec
2014-01-01 22:27 Brian Dolbec
2014-01-01 22:13 Brian Dolbec
2013-12-31 18:56 Anthony G. Basile
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 18:14 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:48 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:39 Brian Dolbec
2013-12-31 4:22 Brian Dolbec
2013-12-31 4:22 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=1388462374.1e7d906277a89e247c9c16b617ef2912dfb16e2b.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