summaryrefslogtreecommitdiffstats
path: root/bin/scons-proc.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2020-03-31 15:10:54 (GMT)
committerMats Wichmann <mats@linux.com>2020-03-31 16:09:35 (GMT)
commit8053e4f154a8bbe1df85a431251a0636a45a4f5d (patch)
tree27765941855611d405664b1e4907cd9b50d6fb19 /bin/scons-proc.py
parent70808bf820a49cb3cf443288083c1e7b3800bba4 (diff)
downloadSCons-8053e4f154a8bbe1df85a431251a0636a45a4f5d.zip
SCons-8053e4f154a8bbe1df85a431251a0636a45a4f5d.tar.gz
SCons-8053e4f154a8bbe1df85a431251a0636a45a4f5d.tar.bz2
Fix generated tools doc intermediate file. [ci skip]
The process to generate tools.gen writes entities for links to construction variables used/set by each tool. When this data is written out using lxml's tostring() method, this is encoded, causing &foo; to become &amp;foo; which then doesn't work in later processing as these files are included, as they're no longer valid entity references for substitution. This seems really hard to fix directly, because tostring() is working as documented by doing this, so for now - maybe forever in light of thoughts of converting docs to a different format - just postprocess the file to undo the damage. A hack, but fixes #3580 Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'bin/scons-proc.py')
-rw-r--r--bin/scons-proc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/scons-proc.py b/bin/scons-proc.py
index fb05d32..cab4387 100644
--- a/bin/scons-proc.py
+++ b/bin/scons-proc.py
@@ -144,12 +144,18 @@ class SCons_XML(object):
if v.sets:
added = True
vp = stf.newNode("para")
+ # if using lxml, the &entity; entries will be encoded,
+ # effectively breaking them. should fix,
+ # for now handled post-process in calling script.
s = ['&cv-link-%s;' % x for x in v.sets]
stf.setText(vp, 'Sets: ' + ', '.join(s) + '.')
stf.appendNode(vl, vp)
if v.uses:
added = True
vp = stf.newNode("para")
+ # if using lxml, the &entity; entries will be encoded,
+ # effectively breaking them. should fix,
+ # for now handled post-process in calling script.
u = ['&cv-link-%s;' % x for x in v.uses]
stf.setText(vp, 'Uses: ' + ', '.join(u) + '.')
stf.appendNode(vl, vp)