[libvirt] [PATCH] Let make fail when XHTML validation fails

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index eaac627..4df5154 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \ if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \ echo "Validating $@" ; \ - $(XMLLINT) --nonet --format --valid $< > $@ || : ; \ + $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \ else echo "missing XHTML1 DTD" ; fi ; fi ); -- 1.6.6

On Wed, Jan 20, 2010 at 02:14:43PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index eaac627..4df5154 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \ if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \ echo "Validating $@" ; \ - $(XMLLINT) --nonet --format --valid $< > $@ || : ; \ + $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \ else echo "missing XHTML1 DTD" ; fi ; fi );
Hum, maybe that's a bit excessive, while it make sense to see the error in a development environment, I find this a bit hard at installation time. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Wed, Jan 20, 2010 at 04:17:11PM +0100, Daniel Veillard wrote:
On Wed, Jan 20, 2010 at 02:14:43PM +0100, Jiri Denemark wrote:
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- docs/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index eaac627..4df5154 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \ if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \ echo "Validating $@" ; \ - $(XMLLINT) --nonet --format --valid $< > $@ || : ; \ + $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \ else echo "missing XHTML1 DTD" ; fi ; fi );
Hum, maybe that's a bit excessive, while it make sense to see the error in a development environment, I find this a bit hard at installation time.
It shouldn't run at install time, since we made sure that 'make dist' always includes the generated HTML files too. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

diff --git a/docs/Makefile.am b/docs/Makefile.am index eaac627..4df5154 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \ if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \ echo "Validating $@" ; \ - $(XMLLINT) --nonet --format --valid $< > $@ || : ; \ + $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \ else echo "missing XHTML1 DTD" ; fi ; fi );
Hum, maybe that's a bit excessive, while it make sense to see the error in a development environment, I find this a bit hard at installation time.
It shouldn't cause any troubles at installation time. If either xmllint, xmlcatalog or XHTML DTDs are not found, the validation is just skipped without any error. If all of those are found, there is no reason why it would fail as all html.in files which are in git are valid XHTML 1.0. Or did I miss anything? Jirka

On Wed, Jan 20, 2010 at 04:30:55PM +0100, Jiri Denemark wrote:
diff --git a/docs/Makefile.am b/docs/Makefile.am index eaac627..4df5154 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -108,7 +108,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @(if [ -x $(XMLLINT) -a -x $(XMLCATALOG) ] ; then \ if $(XMLCATALOG) /etc/xml/catalog "-//W3C//DTD XHTML 1.0 Strict//EN" > /dev/null ; then \ echo "Validating $@" ; \ - $(XMLLINT) --nonet --format --valid $< > $@ || : ; \ + $(XMLLINT) --nonet --format --valid $< > $@ || (rm $@ && exit 1) ; \ else echo "missing XHTML1 DTD" ; fi ; fi );
Hum, maybe that's a bit excessive, while it make sense to see the error in a development environment, I find this a bit hard at installation time.
It shouldn't cause any troubles at installation time. If either xmllint, xmlcatalog or XHTML DTDs are not found, the validation is just skipped without any error. If all of those are found, there is no reason why it would fail as all html.in files which are in git are valid XHTML 1.0. Or did I miss anything?
Okay, ACK then Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

It shouldn't cause any troubles at installation time. If either xmllint, xmlcatalog or XHTML DTDs are not found, the validation is just skipped without any error. If all of those are found, there is no reason why it would fail as all html.in files which are in git are valid XHTML 1.0. Or did I miss anything?
Okay, ACK then
Pushed then :) Jirka
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Jiri Denemark