From: Zac Medico Date: Sat, 11 Jul 2009 22:19:37 +0000 (-0000) Subject: Eliminate duplicate code inside depgraph._show_missed_update(). X-Git-Tag: v2.2_rc34~50 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0fdf87d248c6db3483de733ccf4315d757009102;p=portage.git Eliminate duplicate code inside depgraph._show_missed_update(). svn path=/main/trunk/; revision=13817 --- 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