PR#3618: handle migrated rpmdb path
Merges #3618 https://pagure.io/koji/pull-request/3618 Fixes: #3617 https://pagure.io/koji/issue/3617 Fedora changed rpmdb location which breaks buildroot listing
This commit is contained in:
commit
fb202273b9
1 changed files with 7 additions and 1 deletions
|
|
@ -696,7 +696,13 @@ class BuildRoot(object):
|
|||
'sigmd5',
|
||||
'size',
|
||||
'buildtime')
|
||||
rpm.addMacro("_dbpath", "%s/var/lib/rpm" % self.rootdir())
|
||||
# Determine db path
|
||||
dbpath = "%s/var/lib/rpm" % self.rootdir()
|
||||
if os.path.exists(os.path.join(dbpath, '.migratedb')):
|
||||
dbpath = "%s/usr/lib/sysimage/rpm" % self.rootdir()
|
||||
if not os.path.exists(dbpath):
|
||||
raise koji.GenericError("Can't get list of installed rpms")
|
||||
rpm.addMacro("_dbpath", dbpath)
|
||||
ret = []
|
||||
try:
|
||||
ts = rpm.TransactionSet()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue