Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13746 - main/trunk/pym/_emerge
Date: Tue, 30 Jun 2009 21:46:25
Message-Id: E1MLl9j-0006GG-9M@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-06-30 21:46:22 +0000 (Tue, 30 Jun 2009)
3 New Revision: 13746
4
5 Modified:
6 main/trunk/pym/_emerge/depgraph.py
7 Log:
8 Tweak depgraph._select_pkg_highest_available_imp to avoid more updates when
9 in --avoid-update, by ignoring masked installed packages and packages for
10 which the ebuild is no longer available.
11
12
13 Modified: main/trunk/pym/_emerge/depgraph.py
14 ===================================================================
15 --- main/trunk/pym/_emerge/depgraph.py 2009-06-30 21:33:42 UTC (rev 13745)
16 +++ main/trunk/pym/_emerge/depgraph.py 2009-06-30 21:46:22 UTC (rev 13746)
17 @@ -1882,6 +1882,7 @@
18 selective = "selective" in self.myparams
19 reinstall = False
20 noreplace = "--noreplace" in self.myopts
21 + avoid_update = "--avoid-update" in self.myopts
22 # Behavior of the "selective" parameter depends on
23 # whether or not a package matches an argument atom.
24 # If an installed package provides an old-style
25 @@ -1918,7 +1919,9 @@
26 continue
27 reinstall_for_flags = None
28
29 - if not installed or (built and matched_packages):
30 + if not pkg.installed or \
31 + (pkg.built and matched_packages and \
32 + not (avoid_update and pkg.installed)):
33 # Only enforce visibility on installed packages
34 # if there is at least one other visible package
35 # available. By filtering installed masked packages
36 @@ -2091,7 +2094,7 @@
37 break
38
39 if len(matched_packages) > 1:
40 - if "--avoid-update" in self.myopts:
41 + if avoid_update:
42 for pkg in matched_packages:
43 if pkg.installed:
44 return pkg, existing_node