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 C3386139084 for ; Fri, 29 Dec 2017 02:27:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D3577E0E59; Fri, 29 Dec 2017 02:27:50 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 A921DE0E59 for ; Fri, 29 Dec 2017 02:27:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 15A3734165F for ; Fri, 29 Dec 2017 02:27:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55922AFC1 for ; Fri, 29 Dec 2017 02:27:45 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1514513115.73219eb1c1878d2dd160ba067c6096ff5aefff95.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 73219eb1c1878d2dd160ba067c6096ff5aefff95 X-VCS-Branch: master Date: Fri, 29 Dec 2017 02:27:45 +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: 5f78746e-39bf-48e1-9940-59911f74e40f X-Archives-Hash: f005063d92225c1a032550dcc50637a5 commit: 73219eb1c1878d2dd160ba067c6096ff5aefff95 Author: Yuta SATOH gmail com> AuthorDate: Fri Dec 29 01:55:05 2017 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Fri Dec 29 02:05:15 2017 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=73219eb1 stagebase.py: Update bind() for Gentoo/FreeBSD tmpfs/shmfs # 363577 Bug url: https://bugs.gentoo.org/363577 catalyst/base/stagebase.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 32cc3df1..eaed73fc 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -967,21 +967,22 @@ class StageBase(TargetBase, ClearBase, GenBase): if "snapcache" in self.settings["options"] and x == "portdir": self.snapcache_lock.read_lock() _cmd = None - if os.uname()[0] == "FreeBSD": - if src == "/dev": - _cmd = ['mount', '-t', 'devfs', 'none', target] - else: - _cmd = ['mount_nullfs', src, target] + if src == "tmpfs": + if "var_tmpfs_portage" in self.settings: + _cmd = ['mount', '-t', 'tmpfs', + '-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G', + src, target] else: - if src == "tmpfs": - if "var_tmpfs_portage" in self.settings: - _cmd = ['mount', '-t', 'tmpfs', - '-o', 'size=' + self.settings['var_tmpfs_portage'] + 'G', - src, target] - elif src == "shmfs": - _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target] + if os.uname()[0] == "FreeBSD": + if src == "/dev": + _cmd = ['mount', '-t', 'devfs', 'none', target] + else: + _cmd = ['mount_nullfs', src, target] else: - _cmd = ['mount', '--bind', src, target] + if src == "shmfs": + _cmd = ['mount', '-t', 'tmpfs', '-o', 'noexec,nosuid,nodev', 'shm', target] + else: + _cmd = ['mount', '--bind', src, target] if _cmd: log.debug('bind(); _cmd = %s', _cmd) cmd(_cmd, env=self.env, fail_func=self.unbind)