Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9654 - main/trunk/pym/_emerge
Date: Mon, 31 Mar 2008 23:12:18
Message-Id: E1JgTAl-00035s-8h@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-03-31 23:12:14 +0000 (Mon, 31 Mar 2008)
3 New Revision: 9654
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 In the package selection loop, move the installed package rejection
9 code as early as possible.
10
11
12 Modified: main/trunk/pym/_emerge/__init__.py
13 ===================================================================
14 --- main/trunk/pym/_emerge/__init__.py 2008-03-31 21:08:10 UTC (rev 9653)
15 +++ main/trunk/pym/_emerge/__init__.py 2008-03-31 23:12:14 UTC (rev 9654)
16 @@ -2572,6 +2572,11 @@
17 for db, pkg_type, built, installed, db_keys in dbs:
18 if existing_node:
19 break
20 + if installed and not find_existing_node:
21 + want_reinstall = empty or \
22 + (found_available_arg and not selective)
23 + if want_reinstall and matched_packages:
24 + continue
25 if hasattr(db, "xmatch"):
26 cpv_list = db.xmatch("match-all", atom)
27 else:
28 @@ -2698,20 +2703,11 @@
29 pkgsettings.setcpv(cpv, mydb=metadata)
30 metadata["USE"] = pkgsettings["PORTAGE_USE"]
31 myeb = cpv
32 - want_reinstall = False
33 - if installed:
34 - want_reinstall = empty or \
35 - (found_available_arg and not selective)
36 pkg = Package(type_name=pkg_type, root=root,
37 cpv=cpv, metadata=metadata,
38 built=built, installed=installed,
39 onlydeps=onlydeps)
40 - if installed and want_reinstall and matched_packages:
41 - # Reject the installed package unless
42 - # there are no other matches.
43 - break
44 - else:
45 - matched_packages.append(pkg)
46 + matched_packages.append(pkg)
47 if reinstall_for_flags:
48 self._reinstall_nodes[pkg] = \
49 reinstall_for_flags
50
51 --
52 gentoo-commits@l.g.o mailing list