Tweak --rebuilt-binaries code to solve bug #306659 once again (logic
authorZac Medico <zmedico@gentoo.org>
Thu, 27 May 2010 10:55:21 +0000 (03:55 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 May 2010 10:55:21 +0000 (03:55 -0700)
was reverted by the --rebuilt-binaries-timestamp patch).

pym/_emerge/depgraph.py

index ae7b2113393b919d7c8d03aba110a38bda00e5f3..a3eee8e25940b4f58d4ce28ebe4691551f62390d 100644 (file)
@@ -2783,7 +2783,8 @@ class depgraph(object):
 
                                        if "--rebuilt-binaries-timestamp" in self._frozen_config.myopts:
                                                minimal_timestamp = self._frozen_config.myopts["--rebuilt-binaries-timestamp"]
-                                               if built_timestamp > installed_timestamp and \
+                                               if built_timestamp and \
+                                                       built_timestamp > installed_timestamp and \
                                                        built_timestamp >= minimal_timestamp:
                                                        return built_pkg, built_pkg
                                        else:
@@ -2791,7 +2792,8 @@ class depgraph(object):
                                                #package. This is for closely tracking a binhost.
                                                #Use --rebuilt-binaries-timestamp 0 if you want only newer binaries
                                                #pulled in here.
-                                               if built_timestamp != installed_timestamp:
+                                               if built_timestamp and \
+                                                       built_timestamp != installed_timestamp:
                                                        return built_pkg, built_pkg
 
                        if avoid_update: