summaryrefslogtreecommitdiffstats
path: root/pym/_emerge
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-05-25 17:30:36 -0700
committerZac Medico <zmedico@gentoo.org>2011-05-25 23:12:38 -0700
commit96a1c4577e7b96cbe7968789013289b82874486e (patch)
tree80ce0b7a0dab5c67a01248d89ce2d2489e93c052 /pym/_emerge
parent36f60082668a1626c3252fdd72b917d02a3eab99 (diff)
downloadportage-96a1c4577e7b96cbe7968789013289b82874486e.tar.gz
portage-96a1c4577e7b96cbe7968789013289b82874486e.tar.bz2
portage-96a1c4577e7b96cbe7968789013289b82874486e.zip
rebuilt-binaries: prefer newer unbuilt
Diffstat (limited to 'pym/_emerge')
-rw-r--r--pym/_emerge/depgraph.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 5f74b6deb..4556681b7 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -3521,11 +3521,15 @@ class depgraph(object):
if rebuilt_binaries:
inst_pkg = None
built_pkg = None
+ unbuilt_pkg = None
for pkg in matched_packages:
if pkg.installed:
inst_pkg = pkg
elif pkg.built:
built_pkg = pkg
+ else:
+ if unbuilt_pkg is None or pkg > unbuilt_pkg:
+ unbuilt_pkg = pkg
if built_pkg is not None and inst_pkg is not None:
# Only reinstall if binary package BUILD_TIME is
# non-empty, in order to avoid cases like to
@@ -3541,7 +3545,9 @@ class depgraph(object):
except (KeyError, ValueError):
installed_timestamp = 0
- if "--rebuilt-binaries-timestamp" in self._frozen_config.myopts:
+ if unbuilt_pkg is not None and unbuilt_pkg > built_pkg:
+ pass
+ elif "--rebuilt-binaries-timestamp" in self._frozen_config.myopts:
minimal_timestamp = self._frozen_config.myopts["--rebuilt-binaries-timestamp"]
if built_timestamp and \
built_timestamp > installed_timestamp and \