Bug 219127 - yum sqlite failure: pkgID should be pkgId
Summary: yum sqlite failure: pkgID should be pkgId
Keywords:
Status: CLOSED DUPLICATE of bug 219029
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-11 10:02 UTC by Gennadi Sushko
Modified: 2014-01-21 22:56 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-11 13:30:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to fix (1.35 KB, patch)
2006-12-11 11:34 UTC, Caolan McNamara
no flags Details | Diff

Description Gennadi Sushko 2006-12-11 10:02:31 UTC
Description of problem:
Yum crashes while resolving dependencies(not always). Found after upgrade to 
python-2.5 and yum-3.0.1 . python-sqlite-1.1.7-1.2.1 was rebuild from FC-core 
srpm to update it's dependency(automatic) python(api)=2.4 .

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

yum-3.0.1-3.fc7
python-2.5-2.fc7
python-sqlite-1.1.7-1.2.1

Steps to Reproduce:
1. yum install kdewebdev
2. 
3.
  
Actual results:

Loading "installonlyn" plugin
Loading "changelog" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 143, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 441, in 
buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 194, in 
resolveDeps
    self.populateTs(test=1)
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 153, in 
populateTs
    self.downloadHeader(txmbr.po)
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 735, in 
downloadHeader
    local =  po.localHdr()
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 464, in localHdr
    pkgname = os.path.basename(self.remote_path)
  File "/usr/lib/python2.5/site-packages/yum/packages.py", line 419, in 
_remote_path
    return self.returnSimple('relativepath')
  File "/usr/lib/python2.5/site-packages/yum/sqlitesack.py", line 66, in 
returnSimple
    (self.pkgID,))
AttributeError: YumAvailablePackageSqlite instance has no attribute 'pkgID'

Comment 1 Caolan McNamara 2006-12-11 11:34:16 UTC
Created attachment 143282 [details]
patch to fix

typo, pkgID should be pkgId methinks

Comment 2 Gennadi Sushko 2006-12-11 12:16:55 UTC
Now works(i had replaced pkgID with pkgId) thanks.

By the way, my sqlitesack.py differs from patch(e.g. no 'c.execute(query)' 
line):

> -            #          dbname, self.pkgId)
> -            c.execute(query)
> +            executeSQL(c, "select %s from packages where pkgId = ?"
 %(dbname,),
>-+                       (self.pkgID,))
>++                       (self.pkgId,))
>              r = c.fetchone()
>              self.simple[varname] = r[0]

my:
.........................................................................
            if db2simplemap.has_key(varname):
                dbname = db2simplemap[varname]
            cache = self.sack.primarydb[self.repo]
            c = cache.cursor()
            executeSQL(c, "select %s from packages where pkgId = ?" %(dbname,),
                       (self.pkgId,))
            r = c.fetchone()
            self.simple[varname] = r[0]
........................................................................

Is it ok?


Comment 3 Caolan McNamara 2006-12-11 12:34:34 UTC
yes, it's ok. My patch is against another patch, i.e. a patch of a patch.

Comment 4 Seth Vidal 2006-12-11 13:30:28 UTC

*** This bug has been marked as a duplicate of 219029 ***


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