Re: [PATCH] docs: Correct invalid hyperlinks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 01, 2014 at 05:06:55PM +0100, Michal Privoznik wrote:
On 01.12.2014 15:37, Martin Kletzander wrote:
Since libvirt.h was split into multiple files and similarly
docs/libvirt-libvirt.html, docs/hvsupport.html have bad hyperlinks.  The
same happens for all the html.in files that used <code class='docref'>
tag, because page.xsl has no idea where to point the link that's found.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
  docs/Makefile.am              |   4 +-
  docs/acl.html.in              |   2 +-
  docs/api.html.in              | 224 ++++++++++++++++++++++++++++++++++--------
  docs/errors.html.in           |   4 +-
  docs/formatdomain.html.in     |  15 ++-
  docs/formatdomaincaps.html.in |  17 ++--
  docs/hvsupport.pl             |  79 ++++++++++-----
  docs/java.html.in             |   6 +-
  docs/page.xsl                 |   5 -
  docs/python.html.in           |   8 +-
  docs/uri.html.in              |  12 ++-
  11 files changed, 278 insertions(+), 98 deletions(-)


diff --git a/docs/hvsupport.pl b/docs/hvsupport.pl
index 6bbd44a..44a30ce 100755
--- a/docs/hvsupport.pl
+++ b/docs/hvsupport.pl
@@ -4,6 +4,8 @@ use strict;
  use warnings;

  use File::Find;
+use XML::XPath;
+use XML::XPath::XMLParser;

So up till now we've used only File::Find which is in core perl.
However, XML::XPath isn't. Therefore build on bare minimal rawhide fails:

make[3]: Entering directory '/home/zippy/tmp/libvirt.git/docs'
  GEN      hvsupport.html.in
Can't locate XML/XPath.pm in @INC (you may need to install the
XML::XPath module) (@INC contains: /usr/local/lib64/perl5
/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
./hvsupport.pl line 7.
BEGIN failed--compilation aborted at ./hvsupport.pl line 7.
Makefile:2327: recipe for target 'hvsupport.html.in' failed
make[3]: *** [hvsupport.html.in] Error 1
make[3]: Leaving directory '/home/zippy/tmp/libvirt.git/docs'

We must require XML::XPath in the specfile now. ACK with this squashed in:

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 0959483..3edb7bd 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -427,6 +427,7 @@ BuildRequires: /usr/bin/pod2man
 %endif
 BuildRequires: git
 BuildRequires: perl
+BuildRequires: perl-XML-XPath
 BuildRequires: python
 %if %{with_systemd}
 BuildRequires: systemd-units

Of course this isn't the only thing I've found missing, but for that
I'll post a separate patch.


Before sending that, make sure that BuildRequires are not applicable
only when building from a tarball.  I'll get to the reason below.

I squashed that in and found out another issue (and then found out
it's not caused by this patch) that we can't do "make dist" if running
with enough threads (make -j9 always fails for me).  The reason is
that there is no rule to make all those html/libvirt-*.html files in
docs/ because they are all built together with html/index.html.

Simple solutions are usually the best, so I'm pushing another separate
commit as a "build breaker", which fixes this issue:

diff --git i/docs/Makefile.am w/docs/Makefile.am
index 684687d..bb52c35 100644
--- i/docs/Makefile.am
+++ w/docs/Makefile.am
@@ -27,6 +27,9 @@ DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt

apihtml =					\
  html/index.html				\
+  $(apihtml_generated)
+
+apihtml_generated = \
  html/libvirt-libvirt-domain.html		\
  html/libvirt-libvirt-domain-snapshot.html	\
  html/libvirt-libvirt-event.html		\
@@ -248,6 +251,8 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
	    -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
	    || { rm $(srcdir)/$@ && exit 1; }; fi

+$(apihtml_generated): html/index.html
+
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
	$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
	  $(XSLTPROC) --nonet -o $(srcdir)/ \
--

That said, I found out that that XML-XPath is only needed when
creating the tarball, but (probably) not when building an RPM with it.

Martin

Attachment: signature.asc
Description: Digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]