From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1367657-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9E70E15808B
	for <garchives@archives.gentoo.org>; Mon, 14 Feb 2022 21:51:13 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id F117BE087E;
	Mon, 14 Feb 2022 21:51:12 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D649CE087E
	for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 21:51:12 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ED92E342CBB
	for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 21:51:11 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 890401BD
	for <gentoo-commits@lists.gentoo.org>; Mon, 14 Feb 2022 21:51:10 +0000 (UTC)
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org>
Message-ID: <1644875455.1327fa9f829e8670c65ff35b9b0bda446991f7ed.sam@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: lib/_emerge/
X-VCS-Repository: proj/portage
X-VCS-Files: lib/_emerge/actions.py
X-VCS-Directories: lib/_emerge/
X-VCS-Committer: sam
X-VCS-Committer-Name: Sam James
X-VCS-Revision: 1327fa9f829e8670c65ff35b9b0bda446991f7ed
X-VCS-Branch: master
Date: Mon, 14 Feb 2022 21:51:10 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 258de341-2359-4e93-b8a0-09703b30434d
X-Archives-Hash: 8f38ff9137a19ff60cd401c7013e6bf0

commit:     1327fa9f829e8670c65ff35b9b0bda446991f7ed
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 14 20:30:18 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 14 21:50:55 2022 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1327fa9f

Revert "lib/_emerge/actions.py: warn on missing /run"

Portage itself does not need /run to be mounted.
build-docbook-catalog was adjusted to create locks in /etc/xml instead.

Bug: https://bugs.gentoo.org/832853
Reverts: 0e9e12aadb889766d61c0561b9723e71542d43e6
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/788
Signed-off-by: Sam James <sam <AT> gentoo.org>

 lib/_emerge/actions.py | 33 ++++++++++++---------------------
 1 file changed, 12 insertions(+), 21 deletions(-)

diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py
index 0255e3e97..f82069f9a 100644
--- a/lib/_emerge/actions.py
+++ b/lib/_emerge/actions.py
@@ -3020,25 +3020,17 @@ def validate_ebuild_environment(trees):
     check_locale()
 
 
-def check_mounted_fs():
-    """We need /proc for finding CPU counts and finding other system information.
-    We need /run for e.g. lock files in ebuilds."""
-    paths = {"/proc": False, "/run": False}
-
-    for path in paths.keys():
-        if platform.system() not in ("Linux",) or os.path.ismount(path):
-            paths[path] = True
-            continue
-
-        msg = "It seems %s is not mounted. Process management may malfunction." % path
-        writemsg_level(
-            "".join("!!! %s\n" % l for l in textwrap.wrap(msg, 70)),
-            level=logging.ERROR,
-            noiselevel=-1,
-        )
-
-    # Were all of the mounts we were looking for available?
-    return all(paths.values())
+def check_procfs():
+    procfs_path = "/proc"
+    if platform.system() not in ("Linux",) or os.path.ismount(procfs_path):
+        return os.EX_OK
+    msg = "It seems that %s is not mounted. You have been warned." % procfs_path
+    writemsg_level(
+        "".join("!!! %s\n" % l for l in textwrap.wrap(msg, 70)),
+        level=logging.ERROR,
+        noiselevel=-1,
+    )
+    return 1
 
 
 def config_protect_check(trees):
@@ -3516,8 +3508,7 @@ def run_action(emerge_config):
         repo_name_check(emerge_config.trees)
         repo_name_duplicate_check(emerge_config.trees)
         config_protect_check(emerge_config.trees)
-
-    check_mounted_fs()
+    check_procfs()
 
     for mytrees in emerge_config.trees.values():
         mydb = mytrees["porttree"].dbapi