[libvirt] [PATCH for 5.10.0] docs: don't run xmllint when generating API HTML files

Daniel P. Berrangé posted 1 patch 4 years, 4 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20191127140638.2882769-1-berrange@redhat.com
docs/Makefile.am | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
[libvirt] [PATCH for 5.10.0] docs: don't run xmllint when generating API HTML files
Posted by Daniel P. Berrangé 4 years, 4 months ago
After generating the API HTML files we run xmllint in docs/html/*.html
to validate the correctness. Since

  commit 0aa8536f14b08dfb5188d0bb3aba532680500d38
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Wed Nov 20 14:49:26 2019 +0000

    docs: generate API reference pages for admin, qemu & lxc libraries

we have many rules generating files into docs/html/. The xmllint
calls for each rule are picking up files which are part-generated by
other parallel build rules resulting in transient errors like:

  GEN      html/index.html
  GEN      html/index-admin.html
  GEN      html/index-qemu.html
  GEN      html/index-lxc.html
  GEN      hvsupport.html.in
html/index-lxc.html:1: parser error : Document is empty

^
make[4]: *** [Makefile:2407: html/index-qemu.html] Error 1

The easiest solution is to move the xmllint rules to the 'make check'
phase of the build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 docs/Makefile.am | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 2a104bc837..0e43f382b1 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -311,16 +311,19 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
 	$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
 	  --stringparam builddir '$(abs_top_builddir)' \
 	  --stringparam timestamp $(timestamp) \
-	  $(srcdir)/newapi.xsl libvirt-api.xml && \
-	  $(XMLLINT) --nonet --noout html/*.html
+	  $(srcdir)/newapi.xsl libvirt-api.xml
 
 html/index-%.html: libvirt-%-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
 	$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
 	  --stringparam builddir '$(abs_top_builddir)' \
 	  --stringparam timestamp $(timestamp) \
 	  --stringparam indexfile $(@:html/%=%) \
-	  $(srcdir)/newapi.xsl $< && \
-	  $(XMLLINT) --nonet --noout html/*.html
+	  $(srcdir)/newapi.xsl $<
+
+check-html:
+	$(XMLLINT) --nonet --noout html/*.html
+
+check-local: check-html
 
 python_generated_files = \
 		html/libvirt-libvirt-lxc.html \
-- 
2.23.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH for 5.10.0] docs: don't run xmllint when generating API HTML files
Posted by Michal Privoznik 4 years, 4 months ago
On 11/27/19 3:06 PM, Daniel P. Berrangé wrote:
> After generating the API HTML files we run xmllint in docs/html/*.html
> to validate the correctness. Since
> 
>    commit 0aa8536f14b08dfb5188d0bb3aba532680500d38
>    Author: Daniel P. Berrangé <berrange@redhat.com>
>    Date:   Wed Nov 20 14:49:26 2019 +0000
> 
>      docs: generate API reference pages for admin, qemu & lxc libraries
> 
> we have many rules generating files into docs/html/. The xmllint
> calls for each rule are picking up files which are part-generated by
> other parallel build rules resulting in transient errors like:
> 
>    GEN      html/index.html
>    GEN      html/index-admin.html
>    GEN      html/index-qemu.html
>    GEN      html/index-lxc.html
>    GEN      hvsupport.html.in
> html/index-lxc.html:1: parser error : Document is empty
> 
> ^
> make[4]: *** [Makefile:2407: html/index-qemu.html] Error 1
> 
> The easiest solution is to move the xmllint rules to the 'make check'
> phase of the build.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   docs/Makefile.am | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)

Right, I've seen some transient docs/ build problems but haven't gotten 
any near to debug them.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list