[Yum-devel] [PATCH] make old installonly packages been erased by installonly_limit depend on the new one, so they will get pulled by skipbroken if the new installonly is pulled because of dep problems (rhbz #561928)

Tim Lauridsen tim.lauridsen at googlemail.com
Sun Feb 7 08:41:00 UTC 2010


On Sun, Feb 7, 2010 at 9:37 AM, Tim Lauridsen
<tim.lauridsen at googlemail.com>wrote:

> ---
>  yum/__init__.py |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/yum/__init__.py b/yum/__init__.py
> index 968362c..b9f9430 100644
> --- a/yum/__init__.py
> +++ b/yum/__init__.py
> @@ -4025,10 +4025,14 @@ class YumBase(depsolve.Depsolve):
>                                 continue
>                             if numleft == 0:
>                                 break
> -                            toremove.append(po)
> +                            toremove.append([po,m])
>                             numleft -= 1
>
> -        map(self.tsInfo.addErase, toremove)
> +        for po,rel in toremove:
> +            txmbr = self.tsInfo.addErase(toremove)
> +            # Add a dep relation to the new version of the package,
> causing this one to be erased
> +            # this way skipbroken, should clean out the old one, if the
> new one is skipped
> +            txmbr.depends_on.append(rel)
>
>     def processTransaction(self, callback=None,rpmTestDisplay=None,
> rpmDisplay=None):
>         '''
> --
> 1.6.6
>
>
I don't know if this is the best way to solve the issues, where a new kernel
pkg is skipped by skip-broken, but the erase of the old one is still in the
transaction.

https://bugzilla.redhat.com/show_bug.cgi?id=561928

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


More information about the Yum-devel mailing list