[Yum-devel] [PATCH] Be cleverer about looking in the yumdb cache
James Antill
james at and.org
Thu Jul 22 19:19:00 UTC 2010
---
yum/rpmsack.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 4501470..8e32fe0 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -1533,7 +1533,7 @@ class RPMDBAdditionalDataPackage(object):
if info is None:
raise AttributeError, "%s has no attribute %s" % (self, attr)
- if self._yumdb_cache is not None:
+ if info.st_nlink > 1 and self._yumdb_cache is not None:
key = (info.st_dev, info.st_ino)
if key in self._yumdb_cache:
self._read_cached_data[attr] = self._yumdb_cache[key]
@@ -1544,7 +1544,7 @@ class RPMDBAdditionalDataPackage(object):
fo.close()
del fo
- if self._yumdb_cache is not None:
+ if info.st_nlink > 1 and self._yumdb_cache is not None:
self._yumdb_cache[key] = self._read_cached_data[attr]
return self._read_cached_data[attr]
--
1.7.1.1
More information about the Yum-devel
mailing list