Hi!
The following patch tries to update already installed pkgs instead of just
installing the "best" arch and think about updates later on. This makes
updates for dependencies more like regular updates and avoids ending up with
pkgs of different version and different arches installed at once - which
will most likely result in multilib file conflicts. The two scenarios that
should change their behavior are:
foo-1.i386 installed; bar requires: foo-2 resulted in foo-1.i386 and
foo-2.x86_64 installed. Now foo-1.i386 is updated to foo-2.i386
foo-1.i386 and foo-1.x86_64 installed; bar requires: foo-2 also resulted in
foo-1.i386 and foo-2.x86_64 installed. Now foo-1.i386 and foo-1.x86_64 are
updated to foo-2.i386 and foo-2.x86_64
Additionally some multilib <-> noarch transitions should win, too.
Florian
>From 146aa544e8620487324a9c4ed9a9a1bbb0298e3a Mon Sep 17 00:00:00 2001
From: Florian Festi <[EMAIL PROTECTED]>
Date: Tue, 30 Oct 2007 10:48:12 +0100
Subject: [PATCH] Fix multilib updates for requirement
---
yum/depsolve.py | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/yum/depsolve.py b/yum/depsolve.py
index b81b1b8..50ecd97 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -489,18 +489,17 @@ class Depsolve(object):
# find the best one
- # first, find out which arch of the ones we can choose from is closest
- # to the arch of the requesting pkg
- # we could be here from _requiringFromInstalled() - check to see if we have
- # an entry in the ts first, if not - look in the rpmdb for the requiring arch
- ts_reqs = self.tsInfo.matchNaevr(name=name, ver=version, rel=release)
- if len(ts_reqs):
- reqpkg = ts_reqs[0]
- else:
- reqpkg = self.rpmdb.searchNevra(name=name, ver=version, rel=release)[0]
-
- thisarch = reqpkg.arch
+ # try updating the already install pkgs
+ for pkg in provSack.returnPackages():
+ txmbrs = self.update(name=pkg.name, epoch=pkg.epoch, version=pkg.version, rel=pkg.rel)
+ if txmbrs:
+ checkdeps = True
+ return checkdeps, missingdep
+
+ # find out which arch of the ones we can choose from is closest
+ # to the arch of the requesting pkg
+ thisarch = requiringPo.arch
newest = provSack.returnNewestByNameArch()
if len(newest) > 1: # there's no way this can be zero
best = newest[0]
--
1.5.2.4
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel