Skip to content

Commit 85aa25f

Browse files
committed
Check for deprecated installer_type and uninstall_method values
1 parent b5669c1 commit 85aa25f

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. This projec
1616

1717
- `check-autopkg-recipes` and `check-munki-pkgsinfo` now validates that `supported_architectures` values are set appropriately.
1818
- In anticipation of Munki 7, `check-munki-pkgsinfo` validates that `version_script` is a string starting with a script shebang.
19+
- `check-munki-pkgsinfo` now checks for specific deprecated `installer_type` and `uninstall_method` values, most of which are detailed [here](https://github.com/munki/munki/wiki/Deprecation-Notes).
1920

2021
### Changed
2122

pre_commit_hooks/check_munki_pkgsinfo.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,36 @@ def main(argv=None):
141141
if not detect_typoed_keys(pkginfo, filename):
142142
retval = 1
143143

144+
# Check for deprecated installer_type values.
145+
depr_installer_types = (
146+
"AdobeAcrobatUpdater",
147+
"AdobeCCPInstaller",
148+
"AdobeCS5AAMEEPackage",
149+
"AdobeCS5PatchInstaller",
150+
"AdobeSetup",
151+
"AdobeUberInstaller",
152+
"appdmg",
153+
"apple_update_metadata",
154+
"profile",
155+
"startosinstall",
156+
)
157+
if pkginfo.get("installer_type") in depr_installer_types:
158+
print(
159+
f"{filename}: WARNING: installer_type '{pkginfo.get('installer_type')}' is deprecated"
160+
)
161+
162+
# Check for deprecated uninstall_method values.
163+
depr_uninstall_methods = (
164+
"AdobeCCPUninstaller",
165+
"AdobeCS5AAMEEPackage",
166+
"AdobeSetup",
167+
"AdobeUberUninstaller",
168+
)
169+
if pkginfo.get("uninstall_method") in depr_uninstall_methods:
170+
print(
171+
f"{filename}: WARNING: uninstall_method '{pkginfo.get('uninstall_method')}' is deprecated"
172+
)
173+
144174
# Check for rogue categories.
145175
if args.categories and pkginfo.get("category") not in args.categories:
146176
print(

0 commit comments

Comments
 (0)