Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10258 - main/trunk/pym/_emerge
Date: Fri, 09 May 2008 03:00:04
Message-Id: E1JuILv-00066q-LM@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-09 02:28:54 +0000 (Fri, 09 May 2008)
3 New Revision: 10258
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 Allow scheduled uninstalls to be selected the same way as other leaf nodes.
9
10
11 Modified: main/trunk/pym/_emerge/__init__.py
12 ===================================================================
13 --- main/trunk/pym/_emerge/__init__.py 2008-05-09 02:15:10 UTC (rev 10257)
14 +++ main/trunk/pym/_emerge/__init__.py 2008-05-09 02:28:54 UTC (rev 10258)
15 @@ -3617,7 +3617,8 @@
16 """
17 return [node for node in mygraph.leaf_nodes(**kwargs) \
18 if isinstance(node, Package) and \
19 - node.operation != "uninstall"]
20 + (node.operation != "uninstall" or \
21 + node in scheduled_uninstalls)]
22
23 # sys-apps/portage needs special treatment if ROOT="/"
24 running_root = "/"
25 @@ -3814,13 +3815,6 @@
26 selected_nodes = list(selected_nodes)
27 selected_nodes.sort(cmp_circular_bias)
28
29 - if not selected_nodes and scheduled_uninstalls:
30 - selected_nodes = set()
31 - for node in scheduled_uninstalls:
32 - if not mygraph.child_nodes(node):
33 - selected_nodes.add(node)
34 - scheduled_uninstalls.difference_update(selected_nodes)
35 -
36 if not selected_nodes and not myblocker_uninstalls.is_empty():
37 # An Uninstall task needs to be executed in order to
38 # avoid conflict if possible.
39 @@ -4004,6 +3998,7 @@
40 "uninstall" == node.operation:
41 have_uninstall_task = True
42 uninst_task = node
43 + scheduled_uninstalls.remove(uninst_task)
44 else:
45 vardb = self.trees[node.root]["vartree"].dbapi
46 previous_cpv = vardb.match(node.slot_atom)
47
48 --
49 gentoo-commits@l.g.o mailing list