Skip to contentSkip to conversation

xml: ccs_update_schema: be verbose about extraction fail

PATCH New Jan Pokorný 2 participants 2 messages Apr 29, 2014 – Apr 30, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xml: ccs_update_schema: be verbose about extraction fail

Previously, the distillation of resource-agents' metadata could fail from unexpected reasons without any evidence ever being made, unlike in case of fence-agents. Also "no metadata" and "issue with their extraction" will allegedly yield the same outcome, so it is reflected in the comments being emitted to the schema for both sorts of agents.

---
 config/tools/xml/ccs_update_schema.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
config/tools/xml/ccs_update_schema.in +5 -2
index 98ed885..b63c987 100644
@@ -215,6 +215,9 @@ generate_ras() {
 		lecho " ras: processing $(basename $i)"
 		$i meta-data 2>/dev/null | xsltproc $rngdir/ra2rng.xsl - >> \
 			"$outputdir/resources.rng.cache" 2>/dev/null
+		[ "$?" != 0 ] && \
+			echo "  <!-- Problem evaluating metadata for $i" \
+				"-->" >> "$outputdir/resources.rng.cache"
 	done
 	cat $rngdir/resources.rng.mid >> "$outputdir/resources.rng.cache"
 	lecho " ras: generating ref data"
@@ -301,8 +304,8 @@ generate_fas() {
 			xsltproc $rngdir/fence2rng.xsl - >> \
 			"$outputdir/fence_agents.rng.cache" 2>/dev/null
 		[ "$?" != 0 ] && \
-			echo "      <!-- No metadata for $i -->" >> \
-				"$outputdir/fence_agents.rng.cache"
+			echo "      <!-- Problem evaluating metadata for $i" \
+				"-->" >> "$outputdir/fence_agents.rng.cache"
 	done
 	cat $rngdir/fence.rng.tail >> "$outputdir/fence_agents.rng.cache"
 }
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 xml: ccs_update_schema: be verbose about extraction fail

ACK

Fabio

Quoted 37 lines · Jan Pokorn?

Previously, the distillation of resource-agents' metadata could fail from unexpected reasons without any evidence ever being made, unlike in case of fence-agents. Also "no metadata" and "issue with their extraction" will allegedly yield the same outcome, so it is reflected in the comments being emitted to the schema for both sorts of agents.

---
 config/tools/xml/ccs_update_schema.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
config/tools/xml/ccs_update_schema.in +5 -2
index 98ed885..b63c987 100644
@@ -215,6 +215,9 @@ generate_ras() {
 		lecho " ras: processing $(basename $i)"
 		$i meta-data 2>/dev/null | xsltproc $rngdir/ra2rng.xsl - >> \
 			"$outputdir/resources.rng.cache" 2>/dev/null
+		[ "$?" != 0 ] && \
+			echo "  <!-- Problem evaluating metadata for $i" \
+				"-->" >> "$outputdir/resources.rng.cache"
 	done
 	cat $rngdir/resources.rng.mid >> "$outputdir/resources.rng.cache"
 	lecho " ras: generating ref data"
@@ -301,8 +304,8 @@ generate_fas() {
 			xsltproc $rngdir/fence2rng.xsl - >> \
 			"$outputdir/fence_agents.rng.cache" 2>/dev/null
 		[ "$?" != 0 ] && \
-			echo "      <!-- No metadata for $i -->" >> \
-				"$outputdir/fence_agents.rng.cache"
+			echo "      <!-- Problem evaluating metadata for $i" \
+				"-->" >> "$outputdir/fence_agents.rng.cache"
 	done
 	cat $rngdir/fence.rng.tail >> "$outputdir/fence_agents.rng.cache"
 }