summaryrefslogtreecommitdiff
path: root/helpcontent2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-11 21:06:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-11 21:06:21 +0000
commit6622f850d4887c4b7efb36ab22f2923bee80ddde (patch)
treea26a6a13aa19809663c819d207e7107326972290 /helpcontent2
parente3f4c59f1b96e4046d6ffbac342a25a78204fe59 (diff)
ensure no busted xml .tree can happen again
Diffstat (limited to 'helpcontent2')
-rw-r--r--helpcontent2/helpers/update_tree.pl2
-rw-r--r--helpcontent2/source/auxiliary/makefile.mk4
2 files changed, 5 insertions, 1 deletions
diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl
index 8dc7bf4e98..80befc2d4e 100644
--- a/helpcontent2/helpers/update_tree.pl
+++ b/helpcontent2/helpers/update_tree.pl
@@ -46,6 +46,7 @@ terminate() if ( ! defined $inpath );
my $destpath = $inpath;
my $with_lang = $ENV{WITH_LANG};
+my $xmllint = $ENV{XMLLINT};
# Always use / directory separators
@@ -308,6 +309,7 @@ sub processtreefiles {
unlink "$tree_dest/$lng/$tv" ;
my $ret=mv $treetmpfile , "$tree_dest/$lng/$tv$inpath" or &terminate("Cannot write to $tree_dest/$lng/$tv$inpath - Error $!");
my $ret=mv "$tree_dest/$lng/$tv$inpath" , "$tree_dest/$lng/$tv" or &terminate("Cannot write to $tree_dest/$lng/$tv - Error $!");
+ system("$xmllint --noout --noent $tree_dest/$lng/$tv") == 0 or &terminate("$tree_dest/$lng/$tv is illformed xml (xmllint)" );
}
} else {
&terminate("Cannot write to $tvout");
diff --git a/helpcontent2/source/auxiliary/makefile.mk b/helpcontent2/source/auxiliary/makefile.mk
index 45ab373443..049879b29d 100644
--- a/helpcontent2/source/auxiliary/makefile.mk
+++ b/helpcontent2/source/auxiliary/makefile.mk
@@ -60,9 +60,11 @@ aux_alllangiso_all:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$
aux_alllangiso:=$(foreach,i,$(aux_alllangiso_all) $(foreach,j,$(help_exist) $(eq,$i,$j $i $(NULL))))
WITH_LANG!:=$(aux_alllangiso)
-
.EXPORT : WITH_LANG
+XMLLINT !:=$(XMLLINT)
+.EXPORT : XMLLINT
+
LOCTREEFILES:=$(foreach,i,$(aux_alllangiso) $(foreach,j,$(TREEFILES) $(COMMONMISC)$/$i$/$j))
.ELSE #IF "$(WITH_LANG)"!=""
aux_langdirs:=en-US