diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-05 02:17:18 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-05 02:17:18 +0000 |
commit | 624166fa9f269367769ac0beb96908727a4c9d1a (patch) | |
tree | 53d1e6efafb8ac85bea7a240663de5666ce97243 | |
parent | 30155313812d97c8daf59faa7f68d5639f9d06ad (diff) | |
download | portage-624166fa9f269367769ac0beb96908727a4c9d1a.tar.gz portage-624166fa9f269367769ac0beb96908727a4c9d1a.tar.bz2 portage-624166fa9f269367769ac0beb96908727a4c9d1a.zip |
A cpv can be returned from dbapi.match() as an old-style virtual match even
in cases when the package does not actually PROVIDE the virtual. Filter out
any such false matches inside depgraph._select_package() and
_show_unsatisfied_dep(). Thanks to Ned Ludd <solar@g.o> for reporting this
issue which was discovered when attempting to install virtual/libc on uclibc
profile. Apparently the uclibc ebuilds need to be fixed to properly set
PROVIDE when the metadata cache is generated.
svn path=/main/trunk/; revision=11622
-rw-r--r-- | pym/_emerge/__init__.py | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 60940e82c..9f72c3789 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5193,6 +5193,7 @@ class depgraph(object): def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None): atom = portage.dep.Atom(atom) + atom_set = InternalPackageSet(initial_atoms=(atom,)) atom_without_use = atom if atom.use: atom_without_use = portage.dep.remove_slot(atom) @@ -5230,13 +5231,22 @@ class depgraph(object): for cpv in cpv_list: metadata, mreasons = get_mask_info(root_config, cpv, pkgsettings, db, pkg_type, built, installed, db_keys) - if atom.use and not mreasons: - missing_use.append(Package(built=built, cpv=cpv, + if metadata is not None: + pkg = Package(built=built, cpv=cpv, installed=installed, metadata=metadata, - root_config=root_config)) - else: - masked_packages.append( - (root_config, pkgsettings, cpv, metadata, mreasons)) + root_config=root_config) + if pkg.cp != atom.cp: + # A cpv can be returned from dbapi.match() as an + # old-style virtual match even in cases when the + # package does not actually PROVIDE the virtual. + # Filter out any such false matches here. + if not atom_set.findAtomForPackage(pkg): + continue + if atom.use and not mreasons: + missing_use.append(pkg) + continue + masked_packages.append( + (root_config, pkgsettings, cpv, metadata, mreasons)) missing_use_reasons = [] missing_iuse_reasons = [] @@ -5326,6 +5336,7 @@ class depgraph(object): if not isinstance(atom, portage.dep.Atom): atom = portage.dep.Atom(atom) atom_cp = atom.cp + atom_set = InternalPackageSet(initial_atoms=(atom,)) existing_node = None myeb = None usepkgonly = "--usepkgonly" in self.myopts @@ -5473,6 +5484,14 @@ class depgraph(object): pkgsettings.setcpv(pkg) pkg.metadata["USE"] = pkgsettings["PORTAGE_USE"] + if pkg.cp != atom.cp: + # A cpv can be returned from dbapi.match() as an + # old-style virtual match even in cases when the + # package does not actually PROVIDE the virtual. + # Filter out any such false matches here. + if not atom_set.findAtomForPackage(pkg): + continue + myarg = None if root == self.target_root: try: |