mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-27 01:11:31 +00:00
scripts: sphinx-pre-install: only show portage hints once
On gentoo, doesn't repeat instructions about how to enable portage. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/d4e7ef1d5e1f0412eb9f9ae4913dc64c0821e002.1754992972.git.mchehab+huawei@kernel.org
This commit is contained in:
parent
94a161d998
commit
12bdcf8989
1 changed files with 11 additions and 5 deletions
|
|
@ -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}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue