Fix NEEDED logic in vardbapi.aux_get() so that empty
authorZac Medico <zmedico@gentoo.org>
Sun, 18 Nov 2007 00:21:37 +0000 (00:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 18 Nov 2007 00:21:37 +0000 (00:21 -0000)
NEEDED doesn't trigger unnecessary cache pulls.

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

pym/portage/dbapi/vartree.py

index 30a75f71df32d11feab8251d0dd3a82aaf7e745e..94f00a8b9a4fca013780e07bc0e51f832a8455b4 100644 (file)
@@ -519,7 +519,7 @@ class vardbapi(dbapi):
                if cache_valid:
                        cache_incomplete = self._aux_cache_keys.difference(metadata)
                        needed = metadata.get("NEEDED")
-                       if needed is None or "\n" not in needed:
+                       if needed is None or needed and "\n" not in needed:
                                # Cached value has whitespace filtered, so it has to be pulled
                                # again. This is temporary migration code which can be removed
                                # later, since it only affects users who are running trunk.