[Yum-devel] [PATCH] Don't cache fileRequires when the user has butchered their rpmdb

Tim Lauridsen tim.lauridsen at googlemail.com
Wed Jan 27 17:32:13 UTC 2010


On Wed, Jan 27, 2010 at 5:12 PM, James Antill <james at and.org> wrote:

>  Basically if something in the rpmdb has missing file requires, then
> don't bother caching the file requires data ... we could actually save
> the Unresolved data too, but I figured it wouldn't be common and we'd
> just tell people to not do that (hint, tim ;).
>  We did this at the entry point which we'd never hit, but missed the
> one we can "easily" hit with rpm --nodeps ... oops.
> ---
>  yum/rpmsack.py |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/yum/rpmsack.py b/yum/rpmsack.py
> index 6840a57..b45f315 100644
> --- a/yum/rpmsack.py
> +++ b/yum/rpmsack.py
> @@ -659,6 +659,11 @@ class RPMDBPackageSack(PackageSackBase):
>          installedUnresolvedFileRequires,
>          installedFileProvides) = data
>
> +        #  Have to do this here, as well as in
> transactionCacheFileRequires,
> +        # because fileRequiresData() calls us directly.
> +        if installedUnresolvedFileRequires:
> +            return
> +
>         fo = open(self._cachedir + '/file-requires.tmp', 'w')
>         fo.write("%s\n" % rpmdbversion)
>
> --
> 1.6.6
>
> _______________________________________________
> Yum-devel mailing list
> Yum-devel at lists.baseurl.org
> http://lists.baseurl.org/mailman/listinfo/yum-devel
>

Tested it works after yum clean rpmdb

ACK

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum-devel/attachments/20100127/13737ee0/attachment.htm>


More information about the Yum-devel mailing list