From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH 6/8] Move generic_stage_targets.py constants to defaults.py
Date: Wed, 2 Apr 2014 13:29:41 -0700 [thread overview]
Message-ID: <1396470583-8756-6-git-send-email-dolsen@gentoo.org> (raw)
In-Reply-To: <1396470583-8756-2-git-send-email-dolsen@gentoo.org>
Rename the source and target mounts defaults to remove
the double plural.
---
catalyst/defaults.py | 27 +++++++++++++++++++++++++
catalyst/targets/generic_stage_target.py | 34 ++++----------------------------
2 files changed, 31 insertions(+), 30 deletions(-)
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index b1dbda4..748d1dd 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -21,3 +21,30 @@ valid_config_file_values.extend(["PKGCACHE", "KERNCACHE", "CCACHE", "DISTCC",
verbosity = 1
+PORT_LOGDIR_CLEAN = \
+ 'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
+
+TARGET_MOUNT_DEFAULTS = {
+ "ccache": "/var/tmp/ccache",
+ "dev": "/dev",
+ "devpts": "/dev/pts",
+ "distdir": "/usr/portage/distfiles",
+ "icecream": "/usr/lib/icecc/bin",
+ "kerncache": "/tmp/kerncache",
+ "packagedir": "/usr/portage/packages",
+ "portdir": "/usr/portage",
+ "port_tmpdir": "/var/tmp/portage",
+ "port_logdir": "/var/log/portage",
+ "proc": "/proc",
+ "shm": "/dev/shm",
+ }
+
+SOURCE_MOUNT_DEFAULTS = {
+ "dev": "/dev",
+ "devpts": "/dev/pts",
+ "distdir": "/usr/portage/distfiles",
+ "portdir": "/usr/portage",
+ "port_tmpdir": "tmpfs",
+ "proc": "/proc",
+ "shm": "shmfs",
+ }
diff --git a/catalyst/targets/generic_stage_target.py b/catalyst/targets/generic_stage_target.py
index de4842c..05c61e8 100644
--- a/catalyst/targets/generic_stage_target.py
+++ b/catalyst/targets/generic_stage_target.py
@@ -4,34 +4,8 @@ from generic_target import *
from stat import *
from catalyst.lock import LockDir
-
-PORT_LOGDIR_CLEAN = \
- 'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete'
-
-TARGET_MOUNTS_DEFAULTS = {
- "ccache": "/var/tmp/ccache",
- "dev": "/dev",
- "devpts": "/dev/pts",
- "distdir": "/usr/portage/distfiles",
- "icecream": "/usr/lib/icecc/bin",
- "kerncache": "/tmp/kerncache",
- "packagedir": "/usr/portage/packages",
- "portdir": "/usr/portage",
- "port_tmpdir": "/var/tmp/portage",
- "port_logdir": "/var/log/portage",
- "proc": "/proc",
- "shm": "/dev/shm",
- }
-
-SOURCE_MOUNTS_DEFAULTS = {
- "dev": "/dev",
- "devpts": "/dev/pts",
- "distdir": "/usr/portage/distfiles",
- "portdir": "/usr/portage",
- "port_tmpdir": "tmpfs",
- "proc": "/proc",
- "shm": "shmfs",
- }
+from catalyst.defaults import (SOURCE_MOUNT_DEFAULTS, TARGET_MOUNT_DEFAULTS,
+ PORT_LOGDIR_CLEAN)
# for convienience
pjoin = os.path.join
@@ -208,11 +182,11 @@ class generic_stage_target(generic_target):
""" Setup our mount points """
# initialize our target mounts.
- self.target_mounts = TARGET_MOUNTS_DEFAULTS.copy()
+ self.target_mounts = TARGET_MOUNT_DEFAULTS.copy()
self.mounts = ["proc", "dev", "portdir", "distdir", "port_tmpdir"]
# initialize our source mounts
- self.mountmap = SOURCE_MOUNTS_DEFAULTS.copy()
+ self.mountmap = SOURCE_MOUNT_DEFAULTS.copy()
# update them from settings
self.mountmap["distdir"] = self.settings["distdir"]
if "SNAPCACHE" not in self.settings:
--
1.8.5.3
next prev parent reply other threads:[~2014-04-02 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 20:29 [gentoo-catalyst] [PATCH 2/8] Initial separation and creation of contents.py Brian Dolbec
2014-04-02 20:29 ` [gentoo-catalyst] [PATCH 3/8] main.py: print the output of an ImportError to help in debugging Brian Dolbec
2014-04-02 20:29 ` [gentoo-catalyst] [PATCH 4/8] Fix undefined variable: RLIMIT_NOFILE Brian Dolbec
2014-04-02 20:29 ` [gentoo-catalyst] [PATCH 5/8] Creation of a new defaults.py Brian Dolbec
2014-04-02 20:29 ` Brian Dolbec [this message]
2014-04-02 20:29 ` [gentoo-catalyst] [PATCH 7/8] Move confdefaults out of main.py Brian Dolbec
2014-04-02 20:29 ` [gentoo-catalyst] [PATCH 8/8] livecdfs-update: No tmpfs on /lib/firmware 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=1396470583-8756-6-git-send-email-dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-catalyst@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