From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>
Subject: [PATCH 5/5] scripts: sphinx-pre-install: change the output order
Date: Tue, 21 Apr 2020 16:31:09 +0200 [thread overview]
Message-ID: <36cecf7fe19d165db8e93f8a0f6fc88ec705d131.1587478901.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1587478901.git.mchehab+huawei@kernel.org>
When the script detects the need for an upgrade, it will
print either a warning or a note.
Let's change a little bit the order where messages will be
displayed, in order to make easier for the user to identify
the more important messages.
It should now be like this:
Detected OS: Fedora release 31 (Thirty One).
Sphinx version: 1.7.9
Note: It is recommended at least Sphinx version 2.4.4 if you need PDF support.
To upgrade Sphinx, use:
/usr/bin/python3 -m venv sphinx_2.4.4
. sphinx_2.4.4/bin/activate
pip install -r ./Documentation/sphinx/requirements.txt
If you want to exit the virtualenv, you can use:
deactivate
All optional dependencies are met.
Needed package dependencies are met.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
scripts/sphinx-pre-install | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 987aebf7e3a0..2c7a4f9594cd 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -321,14 +321,11 @@ sub check_sphinx()
if ($cur_version lt $rec_version) {
printf "Sphinx version %s\n", $cur_version;
- print "Warning: It is recommended at least Sphinx version $rec_version.\n";
- print " If you want pdf, you need at least $min_pdf_version.\n";
$rec_sphinx_upgrade = 1;
return;
}
if ($cur_version lt $min_pdf_version) {
printf "Sphinx version %s\n", $cur_version;
- print "Note: It is recommended at least Sphinx version $min_pdf_version if you need PDF support.\n";
$rec_sphinx_upgrade = 1;
return;
}
@@ -799,6 +796,13 @@ sub check_needs()
my $min_activate = "$ENV{'PWD'}/${virtenv_prefix}${min_version}/bin/activate";
my @activates = glob "$ENV{'PWD'}/${virtenv_prefix}*/bin/activate";
+ if ($cur_version lt $rec_version) {
+ print "Warning: It is recommended at least Sphinx version $rec_version.\n";
+ print " If you want pdf, you need at least $min_pdf_version.\n";
+ }
+ if ($cur_version lt $min_pdf_version) {
+ print "Note: It is recommended at least Sphinx version $min_pdf_version if you need PDF support.\n";
+ }
@activates = sort {$b cmp $a} @activates;
my ($activate, $ver);
foreach my $f (@activates) {
--
2.25.2
next prev parent reply other threads:[~2020-04-21 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 14:31 [PATCH 0/5] More changes for sphinx-pre-install script Mauro Carvalho Chehab
2020-04-21 14:31 ` [PATCH 1/5] scripts: sphinx-pre-install: only ask to activate valid venvs Mauro Carvalho Chehab
2020-04-21 14:31 ` [PATCH 2/5] scripts: sphinx-pre-install: change the warning for version < 2.4.4 Mauro Carvalho Chehab
2020-04-21 14:31 ` [PATCH 3/5] scripts: sphinx-pre-install: change recommendation text if venv exists Mauro Carvalho Chehab
2020-04-21 14:31 ` [PATCH 4/5] scripts: sphinx-pre-install: fix a bug when using with venv Mauro Carvalho Chehab
2020-04-21 14:31 ` Mauro Carvalho Chehab [this message]
2020-04-21 16:27 ` [PATCH v1.1 5/5] scripts: sphinx-pre-install: change the output order Mauro Carvalho Chehab
2020-04-28 18:53 ` [PATCH 0/5] More changes for sphinx-pre-install script Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36cecf7fe19d165db8e93f8a0f6fc88ec705d131.1587478901.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).