From: Zac Medico Date: Wed, 27 Jun 2007 15:15:51 +0000 (-0000) Subject: Instead of just a list, use a cat/pkg dict for matching packages against args in... X-Git-Tag: v2.1.3~129 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=44968dd9ae0c41ebc21e0dff08f6c78a752f2fbb;p=portage.git Instead of just a list, use a cat/pkg dict for matching packages against args in the depgraph. (trunk r7061) svn path=/main/branches/2.1.2/; revision=7062 --- diff --git a/bin/emerge b/bin/emerge index b80cff9a7..5c27d4b88 100755 --- a/bin/emerge +++ b/bin/emerge @@ -977,7 +977,7 @@ class depgraph: self._parent_child_digraph = digraph() self.orderedkeys=[] self.outdatedpackages=[] - self.args_keys = [] + self._args_atoms = {} self.blocker_digraph = digraph() self.blocker_parents = {} self._unresolved_blocker_parents = {} @@ -1111,7 +1111,9 @@ class depgraph: if not arg and myroot == self.target_root: cpv_slot = "%s:%s" % (mykey, mydbapi.aux_get(mykey, ["SLOT"])[0]) - arg = portage.best_match_to_list(cpv_slot, self.args_keys) + cp = portage.dep_getkey(mykey) + if cp in self._args_atoms: + arg = portage.best_match_to_list(cpv_slot, self._args_atoms[cp]) if myuse is None: self.pkgsettings[myroot].setcpv(mykey, mydb=portdb) @@ -1442,7 +1444,9 @@ class depgraph: """ These are used inside self.create() in order to ensure packages that happen to match arguments are not incorrectly marked as nomerge.""" - self.args_keys = [x[1] for x in arg_atoms] + for myarg, myatom in arg_atoms: + self._args_atoms.setdefault( + portage.dep_getkey(myatom), []).append(myatom) for myarg, myatom in arg_atoms: try: self.mysd = self.select_dep(myroot, myatom, arg=myarg) @@ -1546,11 +1550,13 @@ class depgraph: return 0 mymerge = mycheck[1] - if not mymerge and arg and \ - portage.best_match_to_list(depstring, self.args_keys): + if not mymerge and arg: # A provided package has been specified on the command line. The # package will not be merged and a warning will be displayed. - self._pprovided_args.append(arg) + cp = portage.dep_getkey(depstring) + if cp in self._args_atoms and \ + portage.match_to_list(depstring, self._args_atoms[cp]): + self._pprovided_args.append(arg) if myparent: # The parent is added after it's own dep_check call so that it