summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2022-07-02 13:11:27 +0300
committerJonathan Corbet <corbet@lwn.net>2022-07-07 21:47:34 +0300
commit5b27d2551c199c3077b7104b1417b6aecff15d34 (patch)
tree8c66748ee7b8a952530f0adce97917bb9230d114
parented2133b7b5859bc1de86ed44d5cd93096cadc446 (diff)
downloadlinux-5b27d2551c199c3077b7104b1417b6aecff15d34.tar.xz
scripts: sphinx-pre-install: check for PDF min version later on
Better to add the PDF note late for venv recommendation. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Link: https://lore.kernel.org/r/8e117aabe6dfa1b1ec92dccd20e801393c977667.1656756450.git.mchehab@kernel.org Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rwxr-xr-xscripts/sphinx-pre-install15
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index cfb82c548fb3..2ef2c561fdc6 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -785,12 +785,13 @@ sub recommend_sphinx_version($)
{
my $virtualenv_cmd = shift;
- if ($latest_avail_ver lt $min_pdf_version) {
- print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
- }
-
# Version is OK. Nothing to do.
- return if ($cur_version && ($cur_version ge $rec_version));
+ if ($cur_version && ($cur_version ge $rec_version)) {
+ if ($cur_version lt $min_pdf_version) {
+ print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
+ }
+ return;
+ };
if (!$need_sphinx) {
# sphinx-build is present and its version is >= $min_version
@@ -837,6 +838,10 @@ sub recommend_sphinx_version($)
printf "\t. $activate_cmd\n";
deactivate_help();
+ if ($latest_avail_ver lt $min_pdf_version) {
+ print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
+ }
+
return;
}