Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11622 - main/trunk/pym/_emerge
Date: Sun, 05 Oct 2008 02:17:23
Message-Id: E1KmJBQ-00055z-Mf@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-10-05 02:17:18 +0000 (Sun, 05 Oct 2008)
3 New Revision: 11622
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 A cpv can be returned from dbapi.match() as an old-style virtual match even
9 in cases when the package does not actually PROVIDE the virtual. Filter out
10 any such false matches inside depgraph._select_package() and
11 _show_unsatisfied_dep(). Thanks to Ned Ludd <solar@g.o> for reporting this
12 issue which was discovered when attempting to install virtual/libc on uclibc
13 profile. Apparently the uclibc ebuilds need to be fixed to properly set
14 PROVIDE when the metadata cache is generated.
15
16
17 Modified: main/trunk/pym/_emerge/__init__.py
18 ===================================================================
19 --- main/trunk/pym/_emerge/__init__.py 2008-10-04 21:32:29 UTC (rev 11621)
20 +++ main/trunk/pym/_emerge/__init__.py 2008-10-05 02:17:18 UTC (rev 11622)
21 @@ -5193,6 +5193,7 @@
22
23 def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None):
24 atom = portage.dep.Atom(atom)
25 + atom_set = InternalPackageSet(initial_atoms=(atom,))
26 atom_without_use = atom
27 if atom.use:
28 atom_without_use = portage.dep.remove_slot(atom)
29 @@ -5230,13 +5231,22 @@
30 for cpv in cpv_list:
31 metadata, mreasons = get_mask_info(root_config, cpv,
32 pkgsettings, db, pkg_type, built, installed, db_keys)
33 - if atom.use and not mreasons:
34 - missing_use.append(Package(built=built, cpv=cpv,
35 + if metadata is not None:
36 + pkg = Package(built=built, cpv=cpv,
37 installed=installed, metadata=metadata,
38 - root_config=root_config))
39 - else:
40 - masked_packages.append(
41 - (root_config, pkgsettings, cpv, metadata, mreasons))
42 + root_config=root_config)
43 + if pkg.cp != atom.cp:
44 + # A cpv can be returned from dbapi.match() as an
45 + # old-style virtual match even in cases when the
46 + # package does not actually PROVIDE the virtual.
47 + # Filter out any such false matches here.
48 + if not atom_set.findAtomForPackage(pkg):
49 + continue
50 + if atom.use and not mreasons:
51 + missing_use.append(pkg)
52 + continue
53 + masked_packages.append(
54 + (root_config, pkgsettings, cpv, metadata, mreasons))
55
56 missing_use_reasons = []
57 missing_iuse_reasons = []
58 @@ -5326,6 +5336,7 @@
59 if not isinstance(atom, portage.dep.Atom):
60 atom = portage.dep.Atom(atom)
61 atom_cp = atom.cp
62 + atom_set = InternalPackageSet(initial_atoms=(atom,))
63 existing_node = None
64 myeb = None
65 usepkgonly = "--usepkgonly" in self.myopts
66 @@ -5473,6 +5484,14 @@
67 pkgsettings.setcpv(pkg)
68 pkg.metadata["USE"] = pkgsettings["PORTAGE_USE"]
69
70 + if pkg.cp != atom.cp:
71 + # A cpv can be returned from dbapi.match() as an
72 + # old-style virtual match even in cases when the
73 + # package does not actually PROVIDE the virtual.
74 + # Filter out any such false matches here.
75 + if not atom_set.findAtomForPackage(pkg):
76 + continue
77 +
78 myarg = None
79 if root == self.target_root:
80 try: