diff options
author | 2018-11-18 14:08:59 -0500 | |
---|---|---|
committer | 2018-11-18 14:08:59 -0500 | |
commit | 4081b20f9f1c6837ae06704422215eb51910491b (patch) | |
tree | c2845ea3caa269dc5f04dd2e7577ac3875b62188 | |
parent | grs/Interpret.py: fix typo (diff) | |
download | grss-4081b20f9f1c6837ae06704422215eb51910491b.tar.gz grss-4081b20f9f1c6837ae06704422215eb51910491b.tar.bz2 grss-4081b20f9f1c6837ae06704422215eb51910491b.zip |
grs/MountDirectories.py: location of /usr/portage is configurable
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | grs/Constants.py | 2 | ||||
-rw-r--r-- | grs/Interpret.py | 3 | ||||
-rw-r--r-- | grs/MountDirectories.py | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/grs/Constants.py b/grs/Constants.py index bdaee25..3c4b3bc 100644 --- a/grs/Constants.py +++ b/grs/Constants.py @@ -87,6 +87,7 @@ class Constants(): 'tmpdir' : '/var/tmp/grs/%s', 'workdir' : '/var/tmp/grs/%s/work', 'package' : '/var/tmp/grs/%s/packages', + 'portage' : '/usr/portage', 'kernelroot' : '/var/tmp/grs/%s/kernel', 'portage_configroot' : '/var/tmp/grs/%s/system', 'pidfile' : '/run/grs-%s.pid' @@ -161,6 +162,7 @@ CONST.LOGFILE = '/var/log/grs.log' CONST.TMPDIR = '/var/tmp/grs' CONST.WORKDIR = '/var/tmp/grs/work' CONST.PACKAGE = '/var/tmp/grs/package' +CONST.PORTAGE = '/usr/portage' CONST.KERNELROOT = '/var/tmp/grs/kernel' CONST.PORTAGE_CONFIGROOT = '/var/tmp/grs/system' CONST.PIDFILE = '/run/grs.pid' diff --git a/grs/Interpret.py b/grs/Interpret.py index 422357d..a06807f 100644 --- a/grs/Interpret.py +++ b/grs/Interpret.py @@ -119,6 +119,7 @@ class Interpret(Daemon): tmpdir = CONST.tmpdirs[self.run_number] workdir = CONST.workdirs[self.run_number] package = CONST.packages[self.run_number] + portage = CONST.portages[self.run_number] kernelroot = CONST.kernelroots[self.run_number] portage_configroot = CONST.portage_configroots[self.run_number] @@ -128,7 +129,7 @@ class Interpret(Daemon): _lo = Log(logfile) _sy = Synchronize(repo_uri, name, libdir, logfile) _se = Seed(stage_uri, tmpdir, portage_configroot, package, logfile) - _md = MountDirectories(portage_configroot, package, logfile) + _md = MountDirectories(portage_configroot, package, portage, logfile) _po = Populate(libdir, workdir, portage_configroot, logfile) _ru = RunScript(libdir, portage_configroot, logfile) _pc = PivotChroot(tmpdir, portage_configroot, logfile) diff --git a/grs/MountDirectories.py b/grs/MountDirectories.py index 692c320..a1a42af 100644 --- a/grs/MountDirectories.py +++ b/grs/MountDirectories.py @@ -27,7 +27,7 @@ class MountDirectories(): """ def __init__(self, portage_configroot=CONST.PORTAGE_CONFIGROOT, \ - package=CONST.PACKAGE, logfile=CONST.LOGFILE): + package=CONST.PACKAGE, portage=CONST.PORTAGE, logfile=CONST.LOGFILE): # The order is respected. Note that 'dev' needs to be mounted beore 'dev/pts'. self.directories = [ 'dev', @@ -35,12 +35,13 @@ class MountDirectories(): {'dev/shm' : ('tmpfs', 'shm')}, 'proc', 'sys', - 'usr/portage', + [portage, 'usr/portage'], [package, 'usr/portage/packages'] ] # Once initiated, we only work with one portage_configroot self.portage_configroot = portage_configroot self.package = package + self.portage = portage self.logfile = logfile # We need to umount in the reverse order self.rev_directories = deepcopy(self.directories) |