[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <299b4dedbfc9b43d734832e8366288b79edae358.1751318230.git.mchehab+huawei@kernel.org>
Date: Mon, 30 Jun 2025 23:35:00 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
To: Linux Doc Mailing List <linux-doc@...r.kernel.org>,
Jonathan Corbet <corbet@....net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"Akira Yokosawa" <akiyks@...il.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@...nel.org>,
"Sai Vishnu M" <saivishnu725@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 12/15] scripts: sphinx-pre-install.py: only show portage hints once
On gentoo, doesn't repeat instructions about how to enable
portage.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
---
scripts/sphinx-pre-install.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/scripts/sphinx-pre-install.py b/scripts/sphinx-pre-install.py
index 72ac64f4e60b..a941eae17a9e 100755
--- a/scripts/sphinx-pre-install.py
+++ b/scripts/sphinx-pre-install.py
@@ -89,6 +89,9 @@ class SphinxDependencyChecker:
self.python_cmd = ""
self.activate_cmd = ""
+ # Certain hints are meant to be shown only once
+ self.first_hint = True
+
self.min_version = (0, 0, 0)
self.cur_version = (0, 0, 0)
self.latest_avail_ver = (0, 0, 0)
@@ -714,11 +717,14 @@ class SphinxDependencyChecker:
"media-gfx/graphviz",
]
- for p in portages:
- result = self.run(["grep", p, "/etc/portage/package.use/*"],
- stdout=subprocess.PIPE, text=True)
- if not result.stdout.strip():
- print(f"\tsudo emerge -av1 {p}")
+ if self.first_hint:
+ for p in portages:
+ result = self.run(["grep", p, "/etc/portage/package.use/*"],
+ stdout=subprocess.PIPE, text=True)
+ if not result.stdout.strip():
+ print(f"\tsudo emerge -av1 {p}")
+
+ self.first_hint = False
print(f"\tsudo emerge --ask {self.install}")
--
2.50.0
Powered by blists - more mailing lists