Bug #306659 - For --rebuilt-binaries, only reinstall if binary package
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 05:45:48 +0000 (05:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 05:45:48 +0000 (05:45 -0000)
BUILD_TIME is non-empty, in order to avoid cases like to bug #306659 where
BUILD_TIME fields are missing in local and/or remote Packages file.

svn path=/main/trunk/; revision=15513

pym/_emerge/depgraph.py

index 65144187b8b6a9d3cc41ad4645fe95004c56b7d8..811e6f52280786fe1e9c7964123a894d28e84afb 100644 (file)
@@ -2640,8 +2640,13 @@ class depgraph(object):
                                        elif pkg.built:
                                                built_pkg = pkg
                                if built_pkg is not None and inst_pkg is not None:
-                                       if built_pkg.metadata['BUILD_TIME'] != \
-                                               inst_pkg.metadata['BUILD_TIME']:
+                                       # Only reinstall if binary package BUILD_TIME is
+                                       # non-empty, in order to avoid cases like to
+                                       # bug #306659 where BUILD_TIME fields are missing
+                                       # in local and/or remote Packages file.
+                                       if built_pkg.metadata['BUILD_TIME'] and \
+                                               (built_pkg.metadata['BUILD_TIME'] != \
+                                               inst_pkg.metadata['BUILD_TIME']):
                                                return built_pkg, built_pkg
 
                        if avoid_update: