[Yum-devel] [PATCH] Prospective fix for https://bugzilla.redhat.com/show_bug.cgi?id=519172
Tim Lauridsen
tim.lauridsen at googlemail.com
Wed Sep 9 08:29:37 UTC 2009
On 09/08/2009 09:14 PM, Seth Vidal wrote:
> If we are running compare_providers() and any of the providers are updates for something installed
> then score them up just slightly and make sure to not REMOVE the items which are NOT updates
> for something installed. There still should be an obsoletes catch in here - maybe even to make sure
> that an obsoleted pkg is never considered AT ALL in compare_providers()
>
> however this makes the bug work out correctly and still has all the unittests working
> ---
> yum/depsolve.py | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/yum/depsolve.py b/yum/depsolve.py
> index d6b1b02..467f657 100644
> --- a/yum/depsolve.py
> +++ b/yum/depsolve.py
> @@ -1083,7 +1083,16 @@ class Depsolve(object):
> # could play a part ... this probably needs a better fix.
> newest = sorted(rpmdbpkgs)[-1]
> if newest.verLT(pkg):
> - ipkgresults[pkg] = 0
> + # give pkgs which are updates just a SLIGHT edge
> + # we should also make sure that any pkg
> + # we are giving an edge to is not obsoleted by
> + # something else in the transaction. :(
> + # there are many ways I hate this - this is but one
> + ipkgresults[pkg] = 5
> + else:
> + # just b/c they're not installed pkgs doesn't mean they should
> + # be ignored entirely. Just not preferred
> + ipkgresults[pkg] = 0
>
> # This is probably only for "renames". What happens is that pkgA-1 gets
> # obsoleted by pkgB but pkgB requires pkgA-2, now _if_ the pkgA txmbr
Look OK to me.
Tim
More information about the Yum-devel
mailing list