Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11704 - main/trunk/pym/_emerge
Date: Mon, 20 Oct 2008 00:44:56
Message-Id: E1KritB-0000FE-DW@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-10-20 00:44:52 +0000 (Mon, 20 Oct 2008)
3 New Revision: 11704
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 Revert previous 2 commits since they broke "selective" behavior.
9
10
11 Modified: main/trunk/pym/_emerge/__init__.py
12 ===================================================================
13 --- main/trunk/pym/_emerge/__init__.py 2008-10-20 00:30:10 UTC (rev 11703)
14 +++ main/trunk/pym/_emerge/__init__.py 2008-10-20 00:44:52 UTC (rev 11704)
15 @@ -5417,17 +5417,20 @@
16 # Therefore, "selective" logic does not consider
17 # whether or not an installed package matches an
18 # argument atom. It only considers whether or not
19 - # available packages match argument atoms.
20 + # available packages match argument atoms, which is
21 + # represented by the found_available_arg flag.
22 + found_available_arg = False
23 for find_existing_node in True, False:
24 if existing_node:
25 break
26 for db, pkg_type, built, installed, db_keys in dbs:
27 if existing_node:
28 break
29 - if not find_existing_node and \
30 - installed and matched_packages and \
31 - (reinstall or empty or not selective):
32 - continue
33 + if installed and not find_existing_node:
34 + want_reinstall = reinstall or empty or \
35 + (found_available_arg and not selective)
36 + if want_reinstall and matched_packages:
37 + continue
38 if hasattr(db, "xmatch"):
39 cpv_list = db.xmatch("match-all", atom)
40 else:
41 @@ -5565,6 +5568,8 @@
42 if not installed:
43 # masked by corruption
44 continue
45 + if not installed and myarg:
46 + found_available_arg = True
47
48 if atom.use and not pkg.built:
49 use = pkg.use.enabled