Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13740 - main/trunk/pym/portage
Date: Tue, 30 Jun 2009 01:16:55
Message-Id: E1MLRxt-0005RA-Mx@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-06-30 01:16:53 +0000 (Tue, 30 Jun 2009)
3 New Revision: 13740
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Remove the upgrade selection code inside dep_zapdeps (from bug #171840 and
9 bug #159360) since the code in depgraph._dep_check_composite_db._visible()
10 from bug #253904 now masks choices that do not match the highest available
11 version in the slot. This means that such undesirable choices automatically
12 go into the dep_zapdeps "other" category.
13
14
15 Modified: main/trunk/pym/portage/__init__.py
16 ===================================================================
17 --- main/trunk/pym/portage/__init__.py 2009-06-30 00:01:08 UTC (rev 13739)
18 +++ main/trunk/pym/portage/__init__.py 2009-06-30 01:16:53 UTC (rev 13740)
19 @@ -7191,50 +7191,9 @@
20 else:
21 other.append(this_choice)
22
23 - # Compare the "all_installed" choices against the "all_available" choices
24 - # for possible missed upgrades. The main purpose of this code is to find
25 - # upgrades of new-style virtuals since _expand_new_virtuals() expands them
26 - # into || ( highest version ... lowest version ). We want to prefer the
27 - # highest all_available version of the new-style virtual when there is a
28 - # lower all_installed version.
29 - preferred = preferred_in_graph + preferred_installed + preferred_any_slot + preferred_non_installed
30 - possible_upgrades = preferred[1:]
31 - for possible_upgrade in possible_upgrades:
32 - atoms, versions, all_available = possible_upgrade
33 - myslots = set(versions)
34 - for other_choice in preferred:
35 - if possible_upgrade is other_choice:
36 - # possible_upgrade will not be promoted, so move on
37 - break
38 - o_atoms, o_versions, o_all_available = other_choice
39 - intersecting_slots = myslots.intersection(o_versions)
40 - if not intersecting_slots:
41 - continue
42 - has_upgrade = False
43 - has_downgrade = False
44 - for myslot in intersecting_slots:
45 - myversion = versions[myslot]
46 - o_version = o_versions[myslot]
47 - difference = pkgcmp(catpkgsplit(myversion)[1:],
48 - catpkgsplit(o_version)[1:])
49 - if difference:
50 - if difference > 0:
51 - has_upgrade = True
52 - else:
53 - has_downgrade = True
54 - break
55 - if has_upgrade and not has_downgrade:
56 - preferred.remove(possible_upgrade)
57 - o_index = preferred.index(other_choice)
58 - preferred.insert(o_index, possible_upgrade)
59 - break
60 + preferred = preferred_in_graph + preferred_installed + \
61 + preferred_any_slot + preferred_non_installed + other
62
63 - # preferred now contains a) and c) from the order above with
64 - # the masked flag differentiating the two. other contains b)
65 - # and d) so adding other to preferred will give us a suitable
66 - # list to iterate over.
67 - preferred.extend(other)
68 -
69 for allow_masked in (False, True):
70 for atoms, versions, all_available in preferred:
71 if all_available or allow_masked: