Bug 178186

Summary: up2date generates a typeError when resolving dependencies for 'cpp'
Product: Red Hat Enterprise Linux 4 Reporter: Peter Wainwright <peter.wainwright>
Component: up2dateAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED WONTFIX QA Contact: Ken Reilly <kreilly>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: tsanders
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 16:19:33 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 Peter Wainwright 2006-01-18 13:52:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.8) Gecko/20050512 Red Hat/1.0.4-1.4.1 Firefox/1.0.4

Description of problem:
Using up2date-4.4.50-4 on Red Hat Enterprise Linux 4 WS for x86:

I just installed RHEL 4 from CD and was testing up2date by updating
packages one at a time from the large list of out-of-date
packages.  I tried to update cpp, and encountered a typeError (not the
first I have seen in up2date, I'm afraid).  Something major has gone wrong
with the resolution of dependencies.  In /var/log/up2date:

[Wed Jan 18 14:05:07 2006] up2date logging into up2date server
[Wed Jan 18 14:05:08 2006] up2date successfully retrieved authentication token from up2date server
[Wed Jan 18 14:05:08 2006] up2date availablePackageList from network
[Wed Jan 18 14:05:08 2006] up2date Unable to import repomd support so repomd support will not be available
[Wed Jan 18 14:05:14 2006] up2date solving dep for: ['cpp']
[Wed Jan 18 14:05:15 2006] up2date   File "/usr/sbin/up2date", line 1265, in ?
    sys.exit(main() or 0)
   File "/usr/sbin/up2date", line 800, in main
    fullUpdate, dryRun=options.dry_run))
   File "/usr/sbin/up2date", line 1137, in batchRun
    batch.run()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 78, in run
    self.__dryRun()
   File "/usr/share/rhn/up2date_client/up2dateBatch.py", line 163, in __dryRun
    self.percentCallback)
   File "/usr/share/rhn/up2date_client/up2date.py", line 386, in dryRun
    ret = depsolve.solvedep()
   File "/usr/share/rhn/up2date_client/depSolver.py", line 750, in solvedep
    ret = self.process_deps(deps)
   File "/usr/share/rhn/up2date_client/depSolver.py", line 644, in process_deps
    changed = self.__dependencies(dependencies)
   File "/usr/share/rhn/up2date_client/depSolver.py", line 410, in __dependencies
    solved, skiplist = self.__skip(solved)
   File "/usr/share/rhn/up2date_client/depSolver.py", line 208, in __skip
    xlist = packageList.removeSkipPackagesFromList(plist)
   File "/usr/share/rhn/up2date_client/packageList.py", line 769, in removeSkipPackagesFromList
    if fnmatch.fnmatch(pkgList[index][0], pattern):
   File "/usr/lib/python2.3/fnmatch.py", line 38, in fnmatch
    return fnmatchcase(name, pat)
   File "/usr/lib/python2.3/fnmatch.py", line 70, in fnmatchcase
    return _cache[pat].match(name) is not None


After some fiddling with the Python debugger and some print commands 
I tracked this problem down to the fact that pkgList[index][0] is
an array not a string.  Further debugging reveals that this patch
is necessary:

--- depSolver.py.BAK	2005-08-26 18:06:03.000000000 +0100
+++ depSolver.py	2006-01-18 13:29:26.226492440 +0000
@@ -404,7 +404,7 @@
                     # add it to the solve list if it's available
                     for p in self.obsoletes[s]:
                         if self.allAvailable.has_key(p[0]):
-                            solved.append(self.allAvailable[p[0]])
+                            solved.extend(self.allAvailable[p[0]])
                             changed = 1
         # sanitize this list
         solved, skiplist = self.__skip(solved)

Now I get a different error, but at least it is no longer a python
exception...



Version-Release number of selected component (if applicable):
up2date-4.4.50-4

How reproducible:
Always

Steps to Reproduce:
1. Run up2date cpp


Actual Results:  I got:

An error has occurred:
exceptions.TypeError
See /var/log/up2date for more information


Expected Results:  cpp and dependencies (gcc etc.) should have updated?

Additional info:

Comment 2 Jiri Pallich 2012-06-20 16:19:33 UTC
Thank you for submitting this issue for consideration in Red Hat Enterprise Linux. The release for which you requested us to review is now End of Life. 
Please See https://access.redhat.com/support/policy/updates/errata/

If you would like Red Hat to re-consider your feature request for an active release, please re-open the request via appropriate support channels and provide additional supporting details about the importance of this issue.