[Yum-devel] sparc64v complex updates

John Haxby jch at thehaxbys.co.uk
Thu Apr 18 16:08:31 UTC 2013

Hello All,

I've been tinkering with a old sparc box recently and noticed an odd
problem when yum updating the kernel.  If I have two kernels currently
installed and use yum update to pick up a third, it's ignored.   Turning
on debug shows that the new kernel is being put in a complex update, but
nothing more is said.  The complex update code completely ignores it.

I've tried three different fixes for this: tell getCanonArch() to return
sparc64 instead of sparc64v (it's a little rack server than no one
loved), another fix was to change

    multiarchlist = rpmUtils.arch.getArchList(multicompat)


    multiarchlist = self._archlist[1:]

which picks up the hack that inserts sparc64 into the result from
getArchList().  The actual fix I've settled on, for the moment, is
attached and that is to put the same hack into the biarches list for the
complex update.   However, going back through the history of this, I see
that there was a time when the arches dict had two entries for sparc64v
-- one mapping to sparc64, the other to sparcv9v (commit bce3a3c).   The
code with the "hack hack hack" comment effectively does both (as does my
attached patch).   I do wonder, though, if the wrong line was selected
for deletion with commit bce3a3c.

Alternatively, perhaps arches should map sparc64v to ['sparcv9v',
'sparc64'] which would make getArchList() much more interesting.

One of this multiplicity of possible fixes is certainly needed, but I'm
not sure which one.   (I also have a version of update-test.py that I
can use to demonstrate the problem nice and easily, without the need for
a machine of the right architecture, I will clean that up and post it if
there is any interest.)

-------------- next part --------------
diff --git a/rpmUtils/updates.py b/rpmUtils/updates.py
index 012d00d..e5fc7e9 100644
--- a/rpmUtils/updates.py
+++ b/rpmUtils/updates.py
@@ -411,6 +411,9 @@ class Updates:
         if self._is_multilib:
             if self.myarch in rpmUtils.arch.multilibArches:
                 biarches = [self.myarch]
+                # hack -- sparc64v is also sparc64 compat
+                if self.myarch == 'sparc64v':
+                    biarches.append('sparc64')
                 biarches = [self.myarch, rpmUtils.arch.arches[self.myarch]]

More information about the Yum-devel mailing list