Bug 118039 - up2date obsSense is sometimes list not int causing TypeError
up2date obsSense is sometimes list not int causing TypeError
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: up2date (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
: 115754 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-11 07:21 EST by Paul Nasrat
Modified: 2008-02-28 21:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-28 21:51:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fix obsflags (418 bytes, patch)
2004-03-11 08:15 EST, Paul Nasrat
no flags Details | Diff

  None (edit)
Description Paul Nasrat 2004-03-11 07:21:30 EST
Description of problem:

Looks like issue with lists vs. scalars again.  When doing update
against rawhide (with added debug):

compat-db 4.1.25 2.1 db4 4.2 2
compat-db 4.1.25 2.1 db4-devel 4.2 2
compat-db 4.1.25 2.1 db4-utils 4.2 2
policy 1.8 1 fam 2.6.10-3 [2]
Traceback (most recent call last):
  File "/usr/sbin/up2date", line 1267, in ?
    sys.exit(main() or 0)
  File "/usr/sbin/up2date", line 797, in main
    fullUpdate, dryRun=options.dry_run))
  File "/usr/sbin/up2date", line 1141, in batchRun
    batch.run()
  File "up2dateBatch.py", line 74, in run
    self.__dryRun()
  File "up2dateBatch.py", line 159, in __dryRun
    self.percentCallback)
  File "up2date.py", line 384, in dryRun
    depsolve.setup()
  File "depSolver.py", line 357, in setup
    self.__add(pkgset, check = 0)
  File "depSolver.py", line 426, in __add
    if not up2dateUtils.isObsoleted(obs, newp):
  File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 154, in
isObsoleted
    if op & int(obsSense):
TypeError: int() argument must be a string or a number


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

up2date-4.3.11-2.1.1
rpm-python-4.3-0.18

How reproducible:

Always

Steps to Reproduce:
1. Have policy 1.7.x installed
2. up2date -u
  
Actual results:

splodes

Expected results:

Works
Additional info:

Work around local hack for getting updated:

    if type(obsSense) == type([]):
        obsSense=obsSense[0]

Feel free to bounce back to rpm for me to handle if it turns out to be
rpm-python badness.  I'm looking into it here
Comment 1 Paul Nasrat 2004-03-11 07:33:44 EST
Small test script to inspect whats going on

#!/usr/bin/python
import sys
sys.path.append("/usr/share/rhn/")
 
import up2date_client.rhnPackageInfo
 
obsoletes=up2date_client.rhnPackageInfo.obsoletesList()
 
for obs in obsoletes:
    print obs
Comment 2 Paul Nasrat 2004-03-11 07:37:43 EST
Any package that has single obsolete obsSense is a list snippet of
above run, obsoletes list is doing this straight from the repoBackends:

['wordtrans', '1.1pre13', '4', '', 'i386', 'wordtrans-qt', '', [0]]
['x3270', '3.3.2.p1', '3', '', 'i386', 'x3270-tcl', '', [0]]
['xemacs-sumo', '20040202', '2', '', 'noarch', 'xemacs-packages', '', 0]
['xemacs-sumo', '20040202', '2', '', 'noarch', 'tm', '', 0]
['xemacs-sumo', '20040202', '2', '', 'noarch', 'ruby-mode-xemacs', '', 0]
['xemacs-sumo-el', '20040202', '2', '', 'noarch',
'xemacs-packages-el', '', [0]]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'x11amp0.7-1-1', '', 0]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'x11amp', '', 0]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'xmms-esd', '', 0]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'xmms-gl', '', 0]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'xmms-mikmod', '', 0]
['xmms', '1.2.9', '5.p.1', 1, 'i386', 'xmms-gnome', '', 0]
['xpdf', '3.00', '3', 1, 'i386', 'xpdf-chinese-simplified', '', 0]
['xpdf', '3.00', '3', 1, 'i386', 'xpdf-chinese-traditional', '', 0]
['xpdf', '3.00', '3', 1, 'i386', 'xpdf-korean', '', 0]
['xpdf', '3.00', '3', 1, 'i386', 'xpdf-japanese', '', 0]
['ypserv', '2.12.1', '1.1', '', 'i386', 'yppasswd', '', [0]]
Comment 3 Paul Nasrat 2004-03-11 08:15:53 EST
Created attachment 98456 [details]
Fix obsflags

This fixes although you have to purge the cached obsoletes in
/var/spool/up2date

triage->easyfix
Comment 4 Adrian Likins 2004-03-22 15:58:00 EST
applied and in testing
Comment 5 Adrian Likins 2004-03-22 16:04:02 EST
*** Bug 115754 has been marked as a duplicate of this bug. ***
Comment 6 petrosyan 2008-02-28 21:51:13 EST
up2date has been removed from Fedora.

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