Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11702 - main/trunk/pym/_emerge
Date: Sun, 19 Oct 2008 17:33:17
Message-Id: E1Krc9T-0005SN-SK@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-10-19 17:33:14 +0000 (Sun, 19 Oct 2008)
3 New Revision: 11702
4
5 Modified:
6 main/trunk/pym/_emerge/__init__.py
7 Log:
8 Remove the "found_available_arg" variable from depgraph._select_pkg() and use
9 the "matched_packages" variable instead. This solve a problem where the
10 "found_available_arg" flag is unreliable due to the slot filtering behavior
11 of depgraph._iter_atoms_for_pkg(). For example, a higher version in a
12 different slot than the available ebuild might be masked or unavailable, and
13 depgraph._iter_atoms_for_pkg() will not identify the available ebuild as
14 a match due to this installed package (which is not available for reinstall).
15
16
17 Modified: main/trunk/pym/_emerge/__init__.py
18 ===================================================================
19 --- main/trunk/pym/_emerge/__init__.py 2008-10-18 20:17:04 UTC (rev 11701)
20 +++ main/trunk/pym/_emerge/__init__.py 2008-10-19 17:33:14 UTC (rev 11702)
21 @@ -5417,9 +5417,7 @@
22 # Therefore, "selective" logic does not consider
23 # whether or not an installed package matches an
24 # argument atom. It only considers whether or not
25 - # available packages match argument atoms, which is
26 - # represented by the found_available_arg flag.
27 - found_available_arg = False
28 + # available packages match argument atoms.
29 for find_existing_node in True, False:
30 if existing_node:
31 break
32 @@ -5428,7 +5426,7 @@
33 break
34 if installed and not find_existing_node:
35 want_reinstall = reinstall or empty or \
36 - (found_available_arg and not selective)
37 + (matched_packages and not selective)
38 if want_reinstall and matched_packages:
39 continue
40 if hasattr(db, "xmatch"):
41 @@ -5568,8 +5566,6 @@
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