diff options
author | Sebastian Luther <SebastianLuther@gmx.de> | 2010-09-03 22:23:11 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-03 13:32:12 -0700 |
commit | b053998a5b745c886a529e20a641dbbac77109e5 (patch) | |
tree | 9e78c59d460a0335f6a083a53ff398c62afed6dc | |
parent | d776c545e620c25da8e034b3f2c69145fcc3d617 (diff) | |
download | portage-b053998a5b745c886a529e20a641dbbac77109e5.tar.gz portage-b053998a5b745c886a529e20a641dbbac77109e5.tar.bz2 portage-b053998a5b745c886a529e20a641dbbac77109e5.zip |
Old "Change USE" message: Don't screw up if the highest version is masked and parent changes exist
-rw-r--r-- | pym/_emerge/depgraph.py | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index a51bd7fac..12f12d472 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2204,14 +2204,24 @@ class depgraph(object): show_missing_use = False if unmasked_use_reasons: # Only show the latest version. - show_missing_use = unmasked_use_reasons[:1] + show_missing_use = [] + pkg_reason = None + parent_reason = None for pkg, mreasons in unmasked_use_reasons: - if myparent and pkg == myparent: - #This happens if a use change on the parent - #leads to a satisfied conditional use dep. - show_missing_use.append((pkg, mreasons)) - break - + if pkg is myparent: + if parent_reason is None: + #This happens if a use change on the parent + #leads to a satisfied conditional use dep. + parent_reason = (pkg, mreasons) + elif pkg_reason is None: + #Don't rely on the first pkg in unmasked_use_reasons, + #being the highest version of the dependency. + pkg_reason = (pkg, mreasons) + if pkg_reason: + show_missing_use.append(pkg_reason) + if parent_reason: + show_missing_use.append(parent_reason) + elif unmasked_iuse_reasons: masked_with_iuse = False for pkg in masked_pkg_instances: |