mirror of
https://github.com/munki/munki.git
synced 2026-04-25 22:40:46 -05:00
Add receipts to the list of key values to hash if an item's uninstall_method is 'removepackages'. We need a complete list of receipt IDs that may have been installed in order to do a good job of uninstalling. This largely affects Office2011_updates, which have unique pkgids for each update. Sigh.
This commit is contained in:
@@ -334,13 +334,19 @@ def clean_repo(repopath, options):
|
||||
manifest_items.add(name)
|
||||
|
||||
metakey = ''
|
||||
for key in ['name', 'catalogs', 'minimum_munki_version',
|
||||
'minimum_os_version', 'maximum_os_version',
|
||||
'supported_architectures', 'installable_condition']:
|
||||
keys_to_hash = ['name', 'catalogs', 'minimum_munki_version',
|
||||
'minimum_os_version', 'maximum_os_version',
|
||||
'supported_architectures', 'installable_condition']
|
||||
if pkginfo.get('uninstall_method') == 'removepackages':
|
||||
keys_to_hash.append('receipts')
|
||||
for key in keys_to_hash:
|
||||
if pkginfo.get(key):
|
||||
value = pkginfo[key]
|
||||
if key == 'catalogs':
|
||||
value = ', '.join(value)
|
||||
if key == 'receipts':
|
||||
value = ', '.join(
|
||||
[item.get('packageid', '') for item in value])
|
||||
metakey += u"%s: %s\n" % (key, value)
|
||||
metakey = metakey.rstrip('\n')
|
||||
if metakey not in pkginfodb:
|
||||
|
||||
Reference in New Issue
Block a user