summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/repoman8
-rw-r--r--pym/repoman/utilities.py6
2 files changed, 9 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman
index 23fcd4da8..aa3a95268 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1314,7 +1314,13 @@ for x in scanlist:
del e
else:
# load USE flags from metadata.xml
- utilities.parse_metadata_use(_metadata_xml, muselist)
+ try:
+ utilities.parse_metadata_use(_metadata_xml, muselist)
+ except portage.exception.ParseError as e:
+ metadata_bad = True
+ stats["metadata.bad"] += 1
+ fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e))
+ muselist = []
# Run other metadata.xml checkers
try:
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index 52ebba725..305080411 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -119,14 +119,12 @@ def parse_metadata_use(xml_tree, uselist=None):
flags = usetag[0].findall("flag")
if not flags:
- raise exception.ParseError("metadata.xml: " + \
- "Malformed input: missing 'flag' tag(s)")
+ raise exception.ParseError("missing 'flag' tag(s)")
for flag in flags:
pkg_flag = flag.get("name")
if pkg_flag is None:
- raise exception.ParseError("metadata.xml: " + \
- "Malformed input: missing 'name' attribute for 'flag' tag")
+ raise exception.ParseError("missing 'name' attribute for 'flag' tag")
uselist.append(pkg_flag)
return uselist