Move generic_stage_targets.py constants to defaults.py
authorBrian Dolbec <dolsen@gentoo.org>
Sat, 4 Jan 2014 01:04:10 +0000 (17:04 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Wed, 2 Apr 2014 20:04:24 +0000 (13:04 -0700)
Rename the source and target mounts defaults to remove
the double plural.

catalyst/defaults.py
catalyst/targets/generic_stage_target.py

index b1dbda486eb6ab9a0b1bcd318023041bd414e380..748d1dd7d0f6009d1f4702bfc13527429e4776bd 100644 (file)
@@ -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",
+       }
index de4842c42e37731b78ad8a89c9e08176ef9faefd..05c61e8fb5765826545891f6f9d72d5e6b6fbaff 100644 (file)
@@ -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: