Bug 219127 - yum sqlite failure: pkgID should be pkgId
yum sqlite failure: pkgID should be pkgId
Status: CLOSED DUPLICATE of bug 219029
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-11 05:02 EST by Gennadi Sushko
Modified: 2014-01-21 17:56 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-11 08:30:28 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)
patch to fix (1.35 KB, patch)
2006-12-11 06:34 EST, Caolan McNamara
no flags Details | Diff

  None (edit)
Description Gennadi Sushko 2006-12-11 05:02:31 EST
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 06:34:16 EST
Created attachment 143282 [details]
patch to fix

typo, pkgID should be pkgId methinks
Comment 2 Gennadi Sushko 2006-12-11 07:16:55 EST
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 07:34:34 EST
yes, it's ok. My patch is against another patch, i.e. a patch of a patch.
Comment 4 Seth Vidal 2006-12-11 08:30:28 EST

*** 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.