Bug 99396

Summary: up2date fails with TypeError: unsubscriptable object
Product: [Retired] Red Hat Linux Reporter: Kirk <kirkjt>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: high    
Version: 9CC: gafton, mihai.ibanescu, simionea
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-20 21:10:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kirk 2003-07-18 16:59:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

Description of problem:
When running up2date on a 7.3 machine, the error output at the bottom occurs. 
This machine was offline awile, but I was able to run up2date package by package
to narrow it down to something in the KDE advisory (RHSA-2003:002 - Security
Advisory).  If it matters, I'm running up2date via SSH, but I also had the same
problem via VNC.

[root@linuxbox root]# up2date --nox -u

Fetching package list for channel: redhat-linux-i386-7.3...
########################################

Fetching Obsoletes list for channel: redhat-linux-i386-7.3...
########################################

Fetching rpm headers...
Traceback (innermost last):
  File "/usr/sbin/up2date", line 781, in ?
    main()
  File "/usr/sbin/up2date", line 569, in main
    pkgNames, fullUpdate, dryRun = dry_run))
  File "/usr/sbin/up2date", line 724, in batchRun
    batch.run()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 57, in run
    self.__findPackagesToUpdate()
  File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 92, in
__findPackagesToUpdate
    self.availableUpdates = plist.getPackagesToInstall()
  File "/usr/share/rhn/up2date_client/packageList.py", line 295, in
getPackagesToInstall
    result = self.__skipPackages(result)
  File "/usr/share/rhn/up2date_client/packageList.py", line 321, in __skipPackages
    packageList = self.__skipFiles(packageList)
  File "/usr/share/rhn/up2date_client/packageList.py", line 336, in __skipFiles
    ignoreMsgCallback = self.ignoreMsgCallback)
  File "/usr/share/rhn/up2date_client/packageList.py", line 400, in buildHeaderList
    hdr = headerList[pkg]
  File "/usr/share/rhn/up2date_client/headers.py", line 123, in __getitem__
    self.__retrievePackage(item)
  File "/usr/share/rhn/up2date_client/headers.py", line 128, in __retrievePackage
    hdr, sourceType = rpcServer.doCall(rpmSource.psc.headerSource.getHeader, item)
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 112, in doCall
    ret = apply(method, args, kwargs)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 239, in getHeader
    header = source.getHeader(pkg, progressCallback = progressCallback)
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 379, in getHeader
    self.headerCache[pkgToStringArch(pkg)] = hdr
  File "/usr/share/rhn/up2date_client/headers.py", line 61, in __setitem__
    self.__cacheLite[item] = self.__liteCopy(value)
  File "/usr/share/rhn/up2date_client/headers.py", line 49, in __liteCopy
    tmp['name'] = header['name']
TypeError: unsubscriptable object



Version-Release number of selected component (if applicable):
up2date-2.8.39-1.7.3

How reproducible:
Always

Steps to Reproduce:
1. Run up2date from Console or X
2.
3.
    

Actual Results:  Message output above

Expected Results:  System should have been updated.

Additional info:

Comment 1 Simon Onea 2003-07-23 10:31:53 UTC
I get almost the same error, but with slightly different (yet still 
incomprehensible) messages. Here is the output of up2date:
------< BEGIN >------
[root@myserver root]# up2date-nox --update

Fetching package list for channel: redhat-linux-i386-9...
########################################

Fetching Obsoletes list for channel: redhat-linux-i386-9...
########################################

Fetching rpm headers...
Traceback (most recent call last):
  File "/usr/sbin/up2date-nox", line 993, in ?
    main()
  File "/usr/sbin/up2date-nox", line 720, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date-nox", line 893, in batchRun
    batch.run()
  File "up2dateBatch.py", line 57, in run
  File "up2dateBatch.py", line 91, in __findPackagesToUpdate
  File "packageList.py", line 308, in getPackagesToInstall
  File "packageList.py", line 336, in __skipPackages
  File "packageList.py", line 357, in __skipFiles
  File "packageList.py", line 416, in buildHeaderList
  File "headers.py", line 121, in __getitem__
  File "headers.py", line 126, in __retrievePackage
  File "rpcServer.py", line 114, in doCall
  File "rpmSource.py", line 239, in getHeader
  File "rpmSource.py", line 677, in getHeader
  File "rpmSource.py", line 130, in saveHeader
TypeError: unsubscriptable object
------< END >------

I have a i686 system and RedHat Linux 9. And unfortunately I have a very slow 
Internet connection. I think that this error might be caused by a time-out, but 
still no error message indicates this.


Comment 2 Simon Onea 2003-07-23 10:37:35 UTC
I forgot to mention that I use up2date-3.1.23-1

Comment 3 Kirk 2003-08-01 04:15:56 UTC
The following command seemed to cure it for me:
rm -f $(find /var/spool/up2date -type f | grep -v rpm$)

Before this, I ran the following (but this didn't seem to cure it because I
still had to run the above)
killall up2date
killall rpm
rm -fr /var/lib/rpm/__*
up2date -p

Comment 4 John Reiser 2003-10-14 23:21:58 UTC
Still happens in up2date-3.1.23.2-1 under RedHat 9:
-----
 Traceback (most recent call last):
  File "/usr/share/rhn/up2date_client/gui.py", line 1063, in showAdvisory
    advisories = rhnErrata.getAdvisoryInfo(rowData[1])
TypeError: unsubscriptable object
-----
Above appeared in Terminal console when running up2date in background ["up2date
&"] and choosing "View advisory" when sane-backends-1.0.9-5.1 was the only item
in the out-of-date list, and was selected.

Comment 5 Josh Bressers 2004-06-21 14:21:11 UTC
Removing security severity.  This is not a security issue.