summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-07-11 22:19:37 +0000
committerZac Medico <zmedico@gentoo.org>2009-07-11 22:19:37 +0000
commit0fdf87d248c6db3483de733ccf4315d757009102 (patch)
treea3995537545c91d09637758aaa6991563e29ab7b
parent22448abb82f36bf6d1589949be07a6747fd056bf (diff)
downloadportage-0fdf87d248c6db3483de733ccf4315d757009102.tar.gz
portage-0fdf87d248c6db3483de733ccf4315d757009102.tar.bz2
portage-0fdf87d248c6db3483de733ccf4315d757009102.zip
Eliminate duplicate code inside depgraph._show_missed_update().
svn path=/main/trunk/; revision=13817
-rw-r--r--pym/_emerge/depgraph.py23
1 files changed, 9 insertions, 14 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 42fb869f3..11b4b4963 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -274,20 +274,15 @@ class depgraph(object):
missed_updates = {}
for pkg, mask_reasons in \
self._dynamic_config._runtime_pkg_mask.iteritems():
- if mask_reasons.get("slot conflict"):
- if pkg.slot_atom in missed_updates:
- other_pkg, parent_atoms = missed_updates[pkg.slot_atom]
- if other_pkg > pkg:
- continue
- missed_updates[pkg.slot_atom] = \
- (pkg, mask_reasons["slot conflict"])
- elif mask_reasons.get("missing dependency"):
- if pkg.slot_atom in missed_updates:
- other_pkg, parent_atoms = missed_updates[pkg.slot_atom]
- if other_pkg > pkg:
- continue
- missed_updates[pkg.slot_atom] = \
- (pkg, mask_reasons["missing dependency"])
+ if pkg.slot_atom in missed_updates:
+ other_pkg, parent_atoms = missed_updates[pkg.slot_atom]
+ if other_pkg > pkg:
+ continue
+ for mask_type, parent_atoms in mask_reasons.iteritems():
+ if not parent_atoms:
+ continue
+ missed_updates[pkg.slot_atom] = (pkg, parent_atoms)
+ break
if not missed_updates:
return