projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c2d45a
)
scripts: sphinx-pre-install: report broken venv
author
Mauro Carvalho Chehab
<mchehab@kernel.org>
Sat, 2 Jul 2022 10:11:26 +0000
(11:11 +0100)
committer
Jonathan Corbet
<corbet@lwn.net>
Thu, 7 Jul 2022 18:47:10 +0000
(12:47 -0600)
After distro upgrades, the directory names for python may change.
On such case, the previously-created venv will be broken, and
sphinx-build won't run.
Add a logic to report it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link:
https://lore.kernel.org/r/f117f03555b0636d2be0b68f3a23b1d3f03ccf1d.1656756450.git.mchehab@kernel.org
[jc: fixed typo in warning message]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
scripts/sphinx-pre-install
patch
|
blob
|
history
diff --git
a/scripts/sphinx-pre-install
b/scripts/sphinx-pre-install
index
ae8c497
..
cfb82c5
100755
(executable)
--- a/
scripts/sphinx-pre-install
+++ b/
scripts/sphinx-pre-install
@@
-720,6
+720,12
@@
sub get_virtenv()
next if (! -f $sphinx_cmd);
my $ver = get_sphinx_version($sphinx_cmd);
+
+ if (!$ver) {
+ $f =~ s#/bin/activate##;
+ print("Warning: virtual environment $f is not working.\nPython version upgrade? Remove it with:\n\n\trm -rf $f\n\n");
+ }
+
if ($need_sphinx && ($ver ge $min_version)) {
return ($f, $ver);
} elsif ($ver gt $cur_version) {