On Tue, 2010-08-24 at 17:10 -0400, Seth Vidal wrote:
> ---
>  yum/depsolve.py |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/yum/depsolve.py b/yum/depsolve.py
> index e9b3fa7..886cca8 100644
> --- a/yum/depsolve.py
> +++ b/yum/depsolve.py
> @@ -1195,6 +1195,10 @@ class Depsolve(object):
>                      #  We get here from bestPackagesFromList(), give a giant
>                      # bump to stuff that is already installed.
>                      pkgresults[pkg] += 1000
> +                elif newest.verGT(pkg):
> +                    # if the version we're looking at is older than what we 
> have installed
> +                    # score it down like we would an obsoleted pkg
> +                    pkgresults[pkg] -= 1024
>              else:
>                  # just b/c they're not installed pkgs doesn't mean they 
> should
>                  # be ignored entirely. Just not preferred


I'm not completely in love with this patch but it does seem to behave
correctly and none of the test cases break.

but..... it feels like one of those cases where this is gonna come back
and bite us later - esp on downgrade depsolving :(

-sv


_______________________________________________
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to