From b616d9ce842fcda526d1c5cc07f61f2a888058ea Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 4 Sep 2006 20:56:58 +0000 Subject: [PATCH] Use a set for masklist inside dep_check. svn path=/main/trunk/; revision=4404 --- pym/portage.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index aba4c224c..600c9cd71 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -3450,16 +3450,11 @@ def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None, mysplit = portage_dep.paren_reduce(depstring) if mysettings: - # XXX: use="all" is only used by repoman. Why would repoman checks want - # profile-masked USE flags to be enabled? - #if use=="all": - # mymasks=archlist[:] - #else: - mymasks = mysettings.usemask + list(mysettings.pusemask) + \ - mysettings.archlist() - - while mysettings["ARCH"] in mymasks: - del mymasks[mymasks.index(mysettings["ARCH"])] + mymasks = set() + mymasks.update(mysettings.usemask) + mymasks.update(mysettings.pusemask) + mymasks.update(mysettings.archlist()) + mymasks.discard(mysettings["ARCH"]) mysplit = portage_dep.use_reduce(mysplit,uselist=myusesplit,masklist=mymasks,matchall=(use=="all"),excludeall=[mysettings["ARCH"]]) else: mysplit = portage_dep.use_reduce(mysplit,uselist=myusesplit,matchall=(use=="all")) -- 2.26.2