aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-14 13:48:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-14 13:48:46 +0000
commit08d507abf5e964f0edd6a7d1245dad6ed3abdc02 (patch)
treea48691232c1d3461907de4d9c6fe311e3fe3284d
parent60792f6f2be532f9ccef9705fcd7aee2b615c672 (diff)
downloadpaludis-08d507abf5e964f0edd6a7d1245dad6ed3abdc02.tar.gz
paludis-08d507abf5e964f0edd6a7d1245dad6ed3abdc02.tar.xz
Eat all our xmllint input to avoid race conditions
-rw-r--r--paludis/qa/metadata_check.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/paludis/qa/metadata_check.cc b/paludis/qa/metadata_check.cc
index fdfe515..7633df4 100644
--- a/paludis/qa/metadata_check.cc
+++ b/paludis/qa/metadata_check.cc
@@ -38,7 +38,14 @@ MetadataCheck::operator() (const FSEntry & f) const
result << Message(qal_major, "Not a regular file");
else
{
- PStream xmllint("xmllint --noout --valid '" + stringify(f) + "'");
+ PStream xmllint("xmllint --noout --nonet --dtdvalid "
+ "/usr/portage/metadata/dtd/metadata.dtd " /// \bug << todo
+ "'" + stringify(f) + "' 2>&1");
+
+ std::string s;
+ while (std::getline(xmllint, s))
+ ;
+
if (0 != xmllint.exit_status())
result << Message(qal_major, "XML validation failed");
}