summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/Package.py12
-rw-r--r--pym/_emerge/depgraph.py5
2 files changed, 11 insertions, 6 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index 938c17733..512703b83 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -52,10 +52,14 @@ class Package(Task):
self.cpv_split = portage.catpkgsplit(self.cpv)
self.pv_split = self.cpv_split[1:]
- def _invalid_metadata(self, msg):
+ def _invalid_metadata(self, msg_type, msg):
if self.invalid is None:
- self.invalid = []
- self.invalid.append(msg)
+ self.invalid = {}
+ msgs = self.invalid.get(msg_type)
+ if msgs is None:
+ msgs = []
+ self.invalid[msg_type] = msgs
+ msgs.append(msg)
class _use_class(object):
@@ -217,7 +221,7 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase):
try:
use_reduce(paren_reduce(v), matchall=1)
except portage.exception.InvalidDependString, e:
- self._pkg._invalid_metadata("%s: %s" % (k, e))
+ self._pkg._invalid_metadata(k + ".syntax", "%s: %s" % (k, e))
def _set_inherited(self, k, v):
if isinstance(v, basestring):
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 371c0b1ea..bb0f4da3b 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -4898,8 +4898,9 @@ def get_masking_status(pkg, pkgsettings, root_config):
mreasons.append("CHOST: %s" % \
pkg.metadata["CHOST"])
if pkg.invalid:
- for msg in pkg.invalid:
- mreasons.append("invalid: %s" % (msg,))
+ for msg_type, msgs in pkg.invalid.iteritems():
+ for msg in msgs:
+ mreasons.append("invalid: %s" % (msg,))
if not pkg.metadata["SLOT"]:
mreasons.append("invalid: SLOT is undefined")