Currently on multiarch systems, you can end up getting a new arch of a
package pulled in if it's done via an obsolete rather than an update
(rh#301661). The attached patch is a first crack at making the behavior
for obsoletes match that of updates. Best way to make clearer is
probably an example...
On your x86_64 system, you removed all i386 packages. Now, there is a
new NetworkManager package which obsoletes dhcdbd. The repository
contains NetworkManager.i386 and NetworkManager.x86_64. With the
current code, you end up with both x86_64 and i386 packages installed.
With the attached patch, you'll only get NetworkManager.x86_64.
I've double checked that arch changing works (ie, NetworkManager.i386 is
the only thing in the repo and it obsoletes dhcdbd.x86_64) and I can't
see any reason this would break.
Jeremy
diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
index 5a98fde..a3985b7 100644
--- a/rpmUtils/updates.py
+++ b/rpmUtils/updates.py
@@ -199,6 +199,12 @@ class Updates:
# look through all the obsoleting packages look for multiple archs per name
# if you find it look for the packages they obsolete
#
+ archesperobs = {}
+ for (n, a, e, v, r) in self.rawobsoletes.keys():
+ if not archesperobs.has_key(n):
+ archesperobs[n] = []
+ archesperobs[n].append(a)
+
for pkgtup in self.rawobsoletes.keys():
(name, arch, epoch, ver, rel) = pkgtup
for (obs_n, flag, (obs_e, obs_v, obs_r)) in self.rawobsoletes[(pkgtup)]:
@@ -214,6 +220,8 @@ class Updates:
if self.returnNewest((pkgver, installedver)) == installedver:
willInstall = 0
break
+ if rpm_a != arch and rpm_a in archesperobs[n]:
+ willInstall = 0
if willInstall:
if not obsdict.has_key(pkgtup):
obsdict[pkgtup] = []
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel