Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9608 - main/branches/2.1.2/bin
Date: Sun, 30 Mar 2008 00:28:39
Message-Id: E1JflPY-000314-Q5@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-30 00:28:35 +0000 (Sun, 30 Mar 2008)
3 New Revision: 9608
4
5 Modified:
6 main/branches/2.1.2/bin/emerge
7 Log:
8 Bug #215308 - Simplify the greedy atoms logic so that it behaves more
9 like StaticFileSet and won't pull in lower slots. (trunk r9607)
10
11
12 Modified: main/branches/2.1.2/bin/emerge
13 ===================================================================
14 --- main/branches/2.1.2/bin/emerge 2008-03-30 00:19:29 UTC (rev 9607)
15 +++ main/branches/2.1.2/bin/emerge 2008-03-30 00:28:35 UTC (rev 9608)
16 @@ -2046,51 +2046,16 @@
17 vardb = self.trees[self.target_root]["vartree"].dbapi
18 greedy_atoms = []
19 for myarg, myatom in arg_atoms:
20 - greedy_atoms.append((myarg, myatom))
21 myslots = set()
22 for cpv in vardb.match(myatom):
23 myslots.add(vardb.aux_get(cpv, ["SLOT"])[0])
24 - if myslots:
25 - best_pkgs = []
26 - if "--usepkg" in self.myopts:
27 - best_pkg = None
28 - for cpv in reversed(bindb.match(myatom)):
29 - metadata = dict(izip(bindb_keys,
30 - bindb.aux_get(cpv, bindb_keys)))
31 - if visible(pkgsettings, cpv, metadata, built=True):
32 - best_pkg = cpv
33 - break
34 - if best_pkg:
35 - best_slot = bindb.aux_get(best_pkg, ["SLOT"])[0]
36 - best_pkgs.append(("binary", best_pkg, best_slot))
37 - if "--usepkgonly" not in self.myopts:
38 - best_pkg = portage.best(portdb.match(myatom))
39 - if best_pkg:
40 - best_slot = portdb.aux_get(best_pkg, ["SLOT"])[0]
41 - best_pkgs.append(("ebuild", best_pkg, best_slot))
42 - if best_pkgs:
43 - best_pkg = portage.best([x[1] for x in best_pkgs])
44 - best_pkgs = [x for x in best_pkgs if x[1] == best_pkg]
45 - best_slot = best_pkgs[0][2]
46 - myslots.add(best_slot)
47 - if len(myslots) > 1:
48 - for myslot in myslots:
49 - myslot_atom = "%s:%s" % \
50 - (portage.dep_getkey(myatom), myslot)
51 - available = False
52 - if "--usepkgonly" not in self.myopts and \
53 - self.trees[self.target_root][
54 - "porttree"].dbapi.match(myslot_atom):
55 - available = True
56 - elif "--usepkg" in self.myopts:
57 - for cpv in bindb.match(myslot_atom):
58 - metadata = dict(izip(bindb_keys,
59 - bindb.aux_get(cpv, bindb_keys)))
60 - if visible(pkgsettings, cpv, metadata, built=True):
61 - available = True
62 - break
63 - if available:
64 - greedy_atoms.append((myarg, myslot_atom))
65 + for myslot in myslots:
66 + myslot_atom = "%s:%s" % \
67 + (portage.dep_getkey(myatom), myslot)
68 + greedy_atoms.append((myarg, myslot_atom))
69 + # In addition to any installed slots, also try to pull
70 + # in the latest new slot that may be available.
71 + greedy_atoms.append((myarg, myatom))
72 arg_atoms = greedy_atoms
73
74 oneshot = "--oneshot" in self.myopts or \
75
76 --
77 gentoo-commits@l.g.o mailing list