summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/egencache29
1 files changed, 19 insertions, 10 deletions
diff --git a/bin/egencache b/bin/egencache
index 923bd1664..bbc59d8ed 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -176,13 +176,7 @@ class GenCache(object):
def run(self):
self._regen.run()
self.returncode |= self._regen.returncode
-
- if self._cp_missing:
- self.returncode |= 1
- for cp in sorted(self._cp_missing):
- writemsg_level(
- "No ebuilds found for '%s'\n" % (cp,),
- level=logging.ERROR, noiselevel=-1)
+ cp_missing = self._cp_missing
trg_cache = self._trg_cache
dead_nodes = None
@@ -200,10 +194,18 @@ class GenCache(object):
else:
cp_set = self._cp_set
cpv_getkey = portage.cpv_getkey
+ dead_nodes = set()
try:
- dead_nodes = set(cpv for cpv in \
- trg_cache.iterkeys() \
- if cpv_getkey(cpv) in cp_set)
+ for cpv in trg_cache.iterkeys():
+ cp = cpv_getkey(cpv)
+ if cp is None:
+ writemsg_level(
+ "Unable to parse cp for '%s'\n" % (cpv,),
+ level=logging.ERROR, noiselevel=-1)
+ else:
+ cp_missing.discard(cp)
+ if cp in cp_set:
+ dead_nodes.add(cpv)
except CacheError, ce:
self.returncode |= 1
writemsg_level(
@@ -212,6 +214,13 @@ class GenCache(object):
(self._portdb.porttree_root, ce),
level=logging.ERROR, noiselevel=-1)
+ if cp_missing:
+ self.returncode |= 1
+ for cp in sorted(cp_missing):
+ writemsg_level(
+ "No ebuilds or cache entries found for '%s'\n" % (cp,),
+ level=logging.ERROR, noiselevel=-1)
+
if dead_nodes:
dead_nodes.difference_update(self._existing_nodes)
for k in dead_nodes: