[Yum-devel] [PATCH] Be cleverer about looking in the yumdb cache
seth vidal
skvidal at fedoraproject.org
Fri Jul 23 14:05:12 UTC 2010
On Thu, 2010-07-22 at 15:19 -0400, James Antill wrote:
> ---
> 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]
ACK
-sv
More information about the Yum-devel
mailing list