From nobody Sat Oct 4 22:36:11 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A6F82F658F; Tue, 12 Aug 2025 15:53:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755013985; cv=none; b=KbfMcWhVqD+rWfuHrNWdhKOduu5Y/Xhr/zbyatkqRBH+2SB/tXkdR0RLMndnrpIvfgissHgOekeNaYrJSF7gU0r237r6f8cui2M1+8aNQSvpeiaQdpbRDB8Cdhcp0UeHuLyHfn+l2zm+Iw+6aZQFnh9EDQI4XM377+eETLMtFAM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755013985; c=relaxed/simple; bh=oCK6WGvw+7PUuHUA0XAEiLZ3Xl9xo2K88VEoJ8LgJJI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dxt0BmJfbSlKgK8J6t6dbioyrmI7P/jykG0aSJLiWRFzgZ6yblUm+pv+zyiG48zw16mLPJmrXoKcifNeZj83m12h+uhWKzyKdtNYn8Si0KfNOqaEPCdSEaIhLbUQBzrw81Dw+67y9+4gEiV2A868LwYwHqp+lBf6B7LCGGC+Dt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JH+4l/z5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JH+4l/z5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD125C4CEF8; Tue, 12 Aug 2025 15:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755013984; bh=oCK6WGvw+7PUuHUA0XAEiLZ3Xl9xo2K88VEoJ8LgJJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JH+4l/z5Ct4Cwi4pgZhQbwRWJEXYJD/k208XqFAD13vlGnP8nSRMF6wvqWqgfaCuY ZW9hjzhb5C4CX8M38WdqbIoBy5s4C7JnnCWmDe4Em0N+5n9faCVIYdQCurU+4oyt6F bNFlmpixwzifAM5BUGypeRH2mdJ09deA0Xkvf0H1pG2WHmmaMVWXwenNH9uWP/53am NxSGkhJDqwcYHMlR+84aylbnqgWhVDI44mA+IZyPN4D5glfvCZB8HYF99ubHdAJZrP 4PMIkUOERzAf6WaKTgyeAKI9ZwAWfgKiEmn4ol12A1IUv/1veY0I4InwoEQyA7l8ue UtZOp6ub6/s1A== Received: from mchehab by mail.kernel.org with local (Exim 4.98.2) (envelope-from ) id 1ulrJ8-00000006kVy-1h5Z; Tue, 12 Aug 2025 17:53:02 +0200 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [PATCH v2 12/39] scripts: sphinx-pre-install: only show portage hints once Date: Tue, 12 Aug 2025 17:52:29 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" On gentoo, doesn't repeat instructions about how to enable portage. Signed-off-by: Mauro Carvalho Chehab --- 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 0e165ad05fdb..808d31bfa790 100755 --- a/scripts/sphinx-pre-install.py +++ b/scripts/sphinx-pre-install.py @@ -89,6 +89,9 @@ class SphinxDependencyChecker: self.python_cmd =3D "" self.activate_cmd =3D "" =20 + # Certain hints are meant to be shown only once + self.first_hint =3D True + self.min_version =3D (0, 0, 0) self.cur_version =3D (0, 0, 0) self.latest_avail_ver =3D (0, 0, 0) @@ -714,11 +717,14 @@ class SphinxDependencyChecker: "media-gfx/graphviz", ] =20 - for p in portages: - result =3D self.run(["grep", p, "/etc/portage/package.use/*"], - stdout=3Dsubprocess.PIPE, text=3DTrue) - if not result.stdout.strip(): - print(f"\tsudo emerge -av1 {p}") + if self.first_hint: + for p in portages: + result =3D self.run(["grep", p, "/etc/portage/package.use/= *"], + stdout=3Dsubprocess.PIPE, text=3DTrue) + if not result.stdout.strip(): + print(f"\tsudo emerge -av1 {p}") + + self.first_hint =3D False =20 print(f"\tsudo emerge --ask {self.install}") =20 --=20 2.50.1