Bug 286761

Summary: need to run rpm --initdb on new tree build
Product: [Fedora] Fedora Reporter: David Cantrell <dcantrell>
Component: pungiAssignee: David Cantrell <dcantrell>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
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: 2007-09-11 19:52:42 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 David Cantrell 2007-09-11 19:34:20 UTC
Trackback during run:

# pungi --nosource --config=/home/dcantrel/recovery/kickstart/mortise.cfg
--all-stages
Pungi.Gather:INFO: Adding repo rawhide
Pungi.Gather:INFO: URL for repo rawhide is
['http://download.fedora.redhat.com/pub/fedora/linux/development/i386/os/']
Pungi.Gather:INFO: Adding repo skunkware
Pungi.Gather:INFO: URL for repo skunkware is
['http://kevlar.boston.burdell.org/skunkware/fedora-devel-core/i386/']
Pungi.Gather:INFO: Adding repo skunkware-noarch
Pungi.Gather:INFO: URL for repo skunkware-noarch is
['http://kevlar.boston.burdell.org/skunkware/fedora-devel-core/noarch/']
Pungi.Gather:INFO: Getting sacks for arches ['athlon', 'i686', 'i586', 'i486',
'i386', 'noarch', 'src']
error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in ./work/i386/yumroot/var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/pungi", line 208, in <module>
    main()
  File "/usr/bin/pungi", line 106, in main
    mygather.getPackageObjects()
  File "/usr/lib/python2.5/site-packages/pypungi/gather.py", line 243, in
getPackageObjects
    searchlist.extend(self.getPackagesFromGroup(group))
  File "/usr/lib/python2.5/site-packages/pypungi/gather.py", line 188, in
getPackagesFromGroup
    if not self.ayum.comps.has_group(group.name):
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 537, in <lambda>
    comps = property(fget=lambda self: self._getGroups(),
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 512, in _getGroups
    pkglist = self.rpmdb.simplePkgList()
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 158, in simplePkgList
    return self.pkglist
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 59, in _get_pkglist
    self._make_header_dict()
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 243, in
_make_header_dict
    for (hdr, idx) in self._all_packages():
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 214, in _all_packages
    mi = ts.dbMatch()
TypeError: rpmdb open failed


Could this be solved by running 'rpm -r ./work/i386/yumroot/ --initdb'?

Comment 1 Jesse Keating 2007-09-11 19:52:42 UTC
this is actually a different bug, in using the default dest dir.  I have a patch
that fixes this.  A work around is to define a --destdir at the command line.