From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3167C138334 for ; Sun, 18 Nov 2018 19:09:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F1984E0B01; Sun, 18 Nov 2018 19:09:11 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ADC8BE0B01 for ; Sun, 18 Nov 2018 19:09:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EF69B335C29 for ; Sun, 18 Nov 2018 19:09:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 69D2545D for ; Sun, 18 Nov 2018 19:09:08 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1542568139.4081b20f9f1c6837ae06704422215eb51910491b.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: grs/ X-VCS-Repository: proj/grss X-VCS-Files: grs/Constants.py grs/Interpret.py grs/MountDirectories.py X-VCS-Directories: grs/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 4081b20f9f1c6837ae06704422215eb51910491b X-VCS-Branch: master Date: Sun, 18 Nov 2018 19:09:08 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d22b92f1-96ee-4496-a9d6-b390f1301df6 X-Archives-Hash: 0f1822e2bf68b25d639c73bb41009b00 commit: 4081b20f9f1c6837ae06704422215eb51910491b Author: Anthony G. Basile gentoo org> AuthorDate: Sun Nov 18 19:08:59 2018 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Sun Nov 18 19:08:59 2018 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=4081b20f grs/MountDirectories.py: location of /usr/portage is configurable Signed-off-by: Anthony G. Basile gentoo.org> grs/Constants.py | 2 ++ grs/Interpret.py | 3 ++- 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)