summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sebastian@pipping.org>2010-02-26 22:10:43 +0100
committerZac Medico <zmedico@gmail.com>2010-03-23 18:44:13 -0700
commit4866b8f1bc4cc4c089916ea5cd4b6d44691e8c6c (patch)
treec3260af500e6c30f71e0c8a660975888843d6375 /bin/repoman
parentinstall_qa_check: make sure init.d and conf.d files do not have syntax errors... (diff)
downloadportage-idfetch-4866b8f1bc4cc4c089916ea5cd4b6d44691e8c6c.tar.gz
portage-idfetch-4866b8f1bc4cc4c089916ea5cd4b6d44691e8c6c.tar.bz2
portage-idfetch-4866b8f1bc4cc4c089916ea5cd4b6d44691e8c6c.zip
Prepare further checks on metadata.xml
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/repoman b/bin/repoman
index c96b1840..61a2c335 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1296,16 +1296,25 @@ for x in scanlist:
else:
metadata_bad = False
- # load USE flags from metadata.xml
+ # read metadata.xml into memory
try:
f = open(os.path.join(checkdir, "metadata.xml"))
- utilities.parse_metadata_use(f, muselist)
+ _metadata_xml = f.read()
f.close()
- except (EnvironmentError, ParseError) as e:
+ except (EnvironmentError, ) as e:
metadata_bad = True
stats["metadata.bad"] += 1
fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e))
del e
+ else:
+ # load USE flags from metadata.xml
+ try:
+ utilities.parse_metadata_use(_metadata_xml, muselist)
+ except (EnvironmentError, ParseError) as e:
+ metadata_bad = True
+ stats["metadata.bad"] += 1
+ fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e))
+ del e
#Only carry out if in package directory or check forced
if xmllint_capable and not metadata_bad: