mirror of
https://github.com/munki/munki.git
synced 2026-02-28 20:09:23 -06:00
Fix issue when matching receipts when an individual receipts's version number is different from the overall item version number
This commit is contained in:
@@ -478,11 +478,13 @@ def makeCatalogDB():
|
||||
for receipt in item.get('receipts', []):
|
||||
try:
|
||||
if 'packageid' in receipt and 'version' in receipt:
|
||||
if not receipt['packageid'] in pkgid_table:
|
||||
pkgid_table[receipt['packageid']] = {}
|
||||
if not vers in pkgid_table[receipt['packageid']]:
|
||||
pkgid_table[receipt['packageid']][vers] = []
|
||||
pkgid_table[receipt['packageid']][vers].append(itemindex)
|
||||
pkgid = receipt['packageid']
|
||||
pkgvers = receipt['version']
|
||||
if not pkgid in pkgid_table:
|
||||
pkgid_table[pkgid] = {}
|
||||
if not pkgvers in pkgid_table[pkgid]:
|
||||
pkgid_table[pkgid][pkgvers] = []
|
||||
pkgid_table[pkgid][pkgvers].append(itemindex)
|
||||
except TypeError:
|
||||
munkicommon.display_warning(
|
||||
'Bad receipt data for %s-%s: %s'
|
||||
|
||||
Reference in New Issue
Block a user