[Yum-devel] [PATCH] if we have some duplicate installed pkgs that do not conflict and we update for the newer one but something deps on the older one. We shouldn't fail against the rpm tscheck, we should fail well before then.
Seth Vidal
skvidal at fedoraproject.org
Thu Oct 8 13:34:31 UTC 2009
On Thu, 8 Oct 2009, James Antill wrote:
> On Wed, 2009-10-07 at 16:35 -0400, Seth Vidal wrote:
>> This adds 'YumBase.doesThisUpdate(pkg1, pkg2)' which lets this check take less time.
>> ---
>> yum/__init__.py | 23 ++++++++++++++++++++++-
>> 1 files changed, 22 insertions(+), 1 deletions(-)
>>
>> diff --git a/yum/__init__.py b/yum/__init__.py
>> index 79383a5..1dc1022 100644
>> --- a/yum/__init__.py
>> +++ b/yum/__init__.py
>> @@ -3154,7 +3154,13 @@ class YumBase(depsolve.Depsolve):
>> elif ipkg.verLT(available_pkg):
>> txmbr = self._add_up_txmbr(requiringPo, available_pkg, ipkg)
>> tx_return.append(txmbr)
>> -
>> +
>> + for txmbr in tx_return:
>> + for i_pkg in self.rpmdb.searchNevra(name=txmbr.name):
>> + if i_pkg not in txmbr.updates:
>> + if self.doesthisUpdate(txmbr.po, i_pkg):
>> + self.tsInfo.addUpdated(i_pkg, txmbr.po)
>> +
>> return tx_return
>>
>> def remove(self, po=None, **kwargs):
>> @@ -4138,3 +4144,18 @@ class YumBase(depsolve.Depsolve):
>>
>> return True # We got a new cache dir
>>
>> + def doesthisUpdate(self, pkg1, pkg2):
>
> Can we make this _doesthisUpdate() so we can do whatever we want with
> it a year from now.
>
sure.
-sv
More information about the Yum-devel
mailing list