Bug 439228 - yum crashes with localupdate
yum crashes with localupdate
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-27 12:31 EDT by Matěj Cepl
Modified: 2014-01-21 18:02 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-27 13:45:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matěj Cepl 2008-03-27 12:31:03 EDT
Description of problem:
I run yum localupdate /mnt/dvddisk/Packages/* to get my failed upgraded F9-Beta
to shape and this what I got (after a lot of informational messages):

/mnt/disk/Packages/glibc-headers-2.7.90-9.i386.rpm: does not update installed
package.
Examining /mnt/disk/Packages/glibc-2.7.90-9.i386.rpm: glibc-2.7.90-9.i386
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 236, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 111, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 309, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd,
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 549, in doCommand
    return base.localInstall(filelist=extcmds, updateonly=updateonly)
  File "/usr/share/yum-cli/cli.py", line 618, in localInstall
    txmbrs = self.installLocal(pkg, updateonly=updateonly)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 2414, in
installLocal
    if po.arch != installed_pkg.arch and (isMultiLibArch(po.arch) or
NameError: global name 'isMultiLibArch' is not defined
[root@localhost yum.repos.d]#

Version-Release number of selected component (if applicable):
yum-3.2.12-4.fc9.noarch

How reproducible:
100% (tried three times)
Comment 1 James Antill 2008-03-27 13:45:44 EDT
 Thanks, the following will fix it:

diff --git a/yum/__init__.py b/yum/__init__.py
index e77a5ad..3a9998b 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -2437,8 +2437,9 @@ class YumBase(depsolve.Depsolve):
                 else:
                     updatepkgs.append((po, installed_pkg))
             elif po.EVR == installed_pkg.EVR:
-                if po.arch != installed_pkg.arch and (isMultiLibArch(po.arch) o
-                          isMultiLibArch(installed_pkg.arch)):
+                if (po.arch != installed_pkg.arch and
+                    (rpmUtils.arch.isMultiLibArch(po.arch) or
+                     rpmUtils.arch.isMultiLibArch(installed_pkg.arch))):
                     installpkgs.append(po)
                 else:
                     donothingpkgs.append(po)

...ie. put rpmUtils.arch. before the two calls.

Note You need to log in before you can comment on or make changes to this bug.