For old-style virtuals, we need to repeat the package.provided
authorZac Medico <zmedico@gentoo.org>
Thu, 3 Apr 2008 16:45:56 +0000 (16:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 3 Apr 2008 16:45:56 +0000 (16:45 -0000)
check against the selected package.

svn path=/main/trunk/; revision=9685

pym/_emerge/__init__.py

index 51a57690046e7ecbb59b5d7f963e6bdfd53eced8..80ddca31d8b5050d03fff798aacc299f17c1f9e9 100644 (file)
@@ -2243,6 +2243,7 @@ class depgraph(object):
                while args:
                        arg = args.pop()
                        for atom in arg.set:
+                               atom_cp = portage.dep_getkey(atom)
                                try:
                                        pprovided = pprovideddict.get(portage.dep_getkey(atom))
                                        if pprovided and portage.match_from_list(atom, pprovided):
@@ -2266,6 +2267,17 @@ class depgraph(object):
                                                        return 0, myfavorites
                                                self._missing_args.append((arg, atom))
                                                continue
+                                       if atom_cp != pkg.cp:
+                                               # For old-style virtuals, we need to repeat the
+                                               # package.provided check against the selected package.
+                                               expanded_atom = atom.replace(atom_cp, pkg.cp)
+                                               pprovided = pprovideddict.get(pkg.cp)
+                                               if pprovided and \
+                                                       portage.match_from_list(expanded_atom, pprovided):
+                                                       # A provided package has been
+                                                       # specified on the command line.
+                                                       self._pprovided_args.append((arg, atom))
+                                                       continue
                                        if pkg.installed and "selective" not in self.myparams:
                                                self._unsatisfied_deps_for_display.append(
                                                        ((myroot, atom), {}))