Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 118039

Summary: up2date obsSense is sometimes list not int causing TypeError
Product: [Fedora] Fedora Reporter: Paul Nasrat <nobody+pnasrat>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED CANTFIX QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: barryn, l_magnus_j
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-29 02:51:13 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:
Attachments:
Description Flags
Fix obsflags none

Description Paul Nasrat 2004-03-11 12:21:30 UTC
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 12:33:44 UTC
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 12:37:43 UTC
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 13:15:53 UTC
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 20:58:00 UTC
applied and in testing

Comment 5 Adrian Likins 2004-03-22 21:04:02 UTC
*** Bug 115754 has been marked as a duplicate of this bug. ***

Comment 6 petrosyan 2008-02-29 02:51:13 UTC
up2date has been removed from Fedora.