From: "Brian Dolbec" <brian.dolbec@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/catalyst:pending commit in: modules/ Date: Fri, 3 Jan 2014 06:12:27 +0000 (UTC) [thread overview] Message-ID: <1388726977.f48028dc0e9ed1da8413f5fc486b43f2d3d5342a.dol-sen@gentoo> (raw) commit: f48028dc0e9ed1da8413f5fc486b43f2d3d5342a 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 Jan 3 05:29:37 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f48028dc 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. --- modules/generic_stage_target.py | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 7919f07..790e4da 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -22,6 +22,15 @@ TARGET_MOUNTS_DEFAULTS = { "proc": "/proc", } +SOURCE_MOUNTS_DEFAULTS = { + "dev": "/dev", + "devpts": "/dev/pts", + "distdir": "/usr/portage/distfiles", + "portdir": "/usr/portage", + "port_tmpdir": "tmpfs", + "proc": "/proc", + } + class generic_stage_target(generic_target): """ @@ -194,23 +203,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 = { - "dev": "/dev", - "devpts": "/dev/pts", - "distdir": self.settings["distdir"], - "portdir": normpath("/".join([ - self.settings["snapshot_cache_path"], - self.settings["repo_name"], - ])), - "port_tmpdir": "tmpfs", - "proc": "/proc", - } - 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")
WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <brian.dolbec@gmail.com> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/catalyst:master commit in: modules/ Date: Mon, 6 Jan 2014 02:00:52 +0000 (UTC) [thread overview] Message-ID: <1388726977.f48028dc0e9ed1da8413f5fc486b43f2d3d5342a.dol-sen@gentoo> (raw) Message-ID: <20140106020052.K4HQnBxL9zIcK-zsyWIBWE6m6c77433VvYqqMCTeorU@z> (raw) commit: f48028dc0e9ed1da8413f5fc486b43f2d3d5342a 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 Jan 3 05:29:37 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=f48028dc 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. --- modules/generic_stage_target.py | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index 7919f07..790e4da 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -22,6 +22,15 @@ TARGET_MOUNTS_DEFAULTS = { "proc": "/proc", } +SOURCE_MOUNTS_DEFAULTS = { + "dev": "/dev", + "devpts": "/dev/pts", + "distdir": "/usr/portage/distfiles", + "portdir": "/usr/portage", + "port_tmpdir": "tmpfs", + "proc": "/proc", + } + class generic_stage_target(generic_target): """ @@ -194,23 +203,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 = { - "dev": "/dev", - "devpts": "/dev/pts", - "distdir": self.settings["distdir"], - "portdir": normpath("/".join([ - self.settings["snapshot_cache_path"], - self.settings["repo_name"], - ])), - "port_tmpdir": "tmpfs", - "proc": "/proc", - } - 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:[~2014-01-03 6:12 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-01-03 6:12 Brian Dolbec [this message] 2014-01-06 2:00 ` [gentoo-commits] proj/catalyst:master commit in: modules/ Brian Dolbec -- strict thread matches above, loose matches on Subject: below -- 2014-01-06 2:00 Brian Dolbec 2014-01-03 6:41 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec 2014-01-06 2:00 [gentoo-commits] proj/catalyst:master " Brian Dolbec 2014-01-03 5:03 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec 2014-01-06 2:00 [gentoo-commits] proj/catalyst:master " Brian Dolbec 2014-01-03 5:03 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec 2014-01-06 2:00 [gentoo-commits] proj/catalyst:master " Brian Dolbec 2013-12-31 4:22 ` [gentoo-commits] proj/catalyst:pending " Brian Dolbec 2014-01-03 6:41 Brian Dolbec 2014-01-03 6:12 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-02 0:04 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:39 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 2013-12-31 4:22 Brian Dolbec 2013-12-31 4:22 Brian Dolbec 2013-12-30 1:44 Brian Dolbec 2013-12-30 1:44 Brian Dolbec 2013-12-30 1:44 Brian Dolbec 2013-12-30 1:44 Brian Dolbec 2013-12-30 1:44 Brian Dolbec 2013-12-20 0:48 Brian Dolbec 2013-12-20 0:29 Brian Dolbec 2013-12-20 0:29 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=1388726977.f48028dc0e9ed1da8413f5fc486b43f2d3d5342a.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: linkBe 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