From: Zac Medico Date: Wed, 27 Mar 2013 05:51:18 +0000 (-0700) Subject: _autounmask_levels: respect keywords, bug #463394 X-Git-Tag: v2.2.0_alpha170~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=566347ec232f50b07c8ab219fee4fef0788c3560;p=portage.git _autounmask_levels: respect keywords, bug #463394 This adds an additional autounmask level which tries to respect keywords while discarding package.mask as discussed in bug #463394. --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 2b368535d..b6dd5ff6a 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4330,8 +4330,9 @@ class depgraph(object): 1. USE + license 2. USE + ~arch + license 3. USE + ~arch + license + missing keywords - 4. USE + ~arch + license + masks - 5. USE + ~arch + license + missing keywords + masks + 4. USE + license + masks + 5. USE + ~arch + license + masks + 6. USE + ~arch + license + missing keywords + masks Some thoughts: * Do least invasive changes first. @@ -4356,7 +4357,20 @@ class depgraph(object): if not autounmask_keep_masks: - for missing_keyword, unmask in ((True, False), (False, True), (True, True)): + autounmask_level.allow_missing_keywords = True + yield autounmask_level + + # 4. USE + license + masks + # Try to respect keywords while discarding + # package.mask (see bug #463394). + autounmask_level.allow_unstable_keywords = False + autounmask_level.allow_missing_keywords = False + autounmask_level.allow_unmasks = True + yield autounmask_level + + autounmask_level.allow_unstable_keywords = True + + for missing_keyword, unmask in ((False, True), (True, True)): autounmask_level.allow_missing_keywords = missing_keyword autounmask_level.allow_unmasks = unmask