aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2022-07-19 21:49:11 -0400
committerAnthony G. Basile <blueness@gentoo.org>2022-07-19 21:49:11 -0400
commita5b44d6b3130b0f676c2408a5d483c9c70da4919 (patch)
tree92aafce79935bf114f3fe665496126791828a339
parentgrs/Kernel.py: remove deprecated option -arch-override (diff)
downloadgrss-a5b44d6b3130b0f676c2408a5d483c9c70da4919.tar.gz
grss-a5b44d6b3130b0f676c2408a5d483c9c70da4919.tar.bz2
grss-a5b44d6b3130b0f676c2408a5d483c9c70da4919.zip
grs/MountDirectories.py: bind mount /var/cache/distfiles
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--grs/Constants.py2
-rw-r--r--grs/Interpret.py3
-rw-r--r--grs/MountDirectories.py8
3 files changed, 9 insertions, 4 deletions
diff --git a/grs/Constants.py b/grs/Constants.py
index f9a640e..8d8df14 100644
--- a/grs/Constants.py
+++ b/grs/Constants.py
@@ -88,6 +88,7 @@ class Constants():
'workdir' : '/var/tmp/grs/%s/work',
'package' : '/var/tmp/grs/%s/packages',
'portage' : '/var/db/repos/gentoo',
+ 'distfiles' : '/var/cache/distfiles',
'kernelroot' : '/var/tmp/grs/%s/kernel',
'portage_configroot' : '/var/tmp/grs/%s/system',
'pidfile' : '/run/grs-%s.pid'
@@ -163,6 +164,7 @@ CONST.TMPDIR = '/var/tmp/grs'
CONST.WORKDIR = '/var/tmp/grs/work'
CONST.PACKAGE = '/var/tmp/grs/package'
CONST.PORTAGE = '/var/db/repos/gentoo'
+CONST.DISTFILES = '/var/cache/distfiles'
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 a06807f..db9be7d 100644
--- a/grs/Interpret.py
+++ b/grs/Interpret.py
@@ -120,6 +120,7 @@ class Interpret(Daemon):
workdir = CONST.workdirs[self.run_number]
package = CONST.packages[self.run_number]
portage = CONST.portages[self.run_number]
+ distfiles = CONST.distfiles[self.run_number]
kernelroot = CONST.kernelroots[self.run_number]
portage_configroot = CONST.portage_configroots[self.run_number]
@@ -129,7 +130,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, portage, logfile)
+ _md = MountDirectories(portage_configroot, package, portage, distfiles, 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 36949d0..24d2f66 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, portage=CONST.PORTAGE, logfile=CONST.LOGFILE):
+ package=CONST.PACKAGE, portage=CONST.PORTAGE, distfiles=CONST.DISTFILES, logfile=CONST.LOGFILE):
# The order is respected. Note that 'dev' needs to be mounted beore 'dev/pts'.
self.directories = [
'dev',
@@ -37,12 +37,14 @@ class MountDirectories():
'sys',
{'run' : ('tmpfs', 'none')},
[portage, 'var/db/repos/gentoo'],
- [package, 'var/cache/binpkgs']
+ [package, 'var/cache/binpkgs'],
+ [distfiles, 'var/cache/distfiles']
]
# Once initiated, we only work with one portage_configroot
self.portage_configroot = portage_configroot
- self.package = package
self.portage = portage
+ self.package = package
+ self.distfiles = distfiles
self.logfile = logfile
# We need to umount in the reverse order
self.rev_directories = deepcopy(self.directories)