File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,6 +425,26 @@ def main(argv=None):
425425 if not validate_restart_action_key (input_key ["pkginfo" ], filename ):
426426 retval = 1
427427
428+ # Check for common mistakes in min/max OS version keys
429+ os_vers_corrections = {
430+ "min_os" : "minimum_os_version" ,
431+ "max_os" : "maximum_os_version" ,
432+ "min_os_vers" : "minimum_os_version" ,
433+ "max_os_vers" : "maximum_os_version" ,
434+ "minimum_os" : "minimum_os_version" ,
435+ "maximum_os" : "maximum_os_version" ,
436+ "minimum_os_vers" : "minimum_os_version" ,
437+ "maximum_os_vers" : "maximum_os_version" ,
438+ }
439+ for os_vers_key in os_vers_corrections :
440+ if os_vers_key in input_key ["pkginfo" ]:
441+ print (
442+ "{}: You used {} when you probably meant {}." .format (
443+ filename , os_vers_key , os_vers_corrections [os_vers_key ]
444+ )
445+ )
446+ retval = 1
447+
428448 # TODO: Additional pkginfo checks here.
429449
430450 # Warn about comments that would be lost during `plutil -convert xml1`
Original file line number Diff line number Diff line change @@ -68,6 +68,26 @@ def main(argv=None):
6868 if not validate_restart_action_key (pkginfo , filename ):
6969 retval = 1
7070
71+ # Check for common mistakes in min/max OS version keys.
72+ os_vers_corrections = {
73+ "min_os" : "minimum_os_version" ,
74+ "max_os" : "maximum_os_version" ,
75+ "min_os_vers" : "minimum_os_version" ,
76+ "max_os_vers" : "maximum_os_version" ,
77+ "minimum_os" : "minimum_os_version" ,
78+ "maximum_os" : "maximum_os_version" ,
79+ "minimum_os_vers" : "minimum_os_version" ,
80+ "maximum_os_vers" : "maximum_os_version" ,
81+ }
82+ for os_vers_key in os_vers_corrections :
83+ if os_vers_key in pkginfo :
84+ print (
85+ "{}: You used {} when you probably meant {}." .format (
86+ filename , os_vers_key , os_vers_corrections [os_vers_key ]
87+ )
88+ )
89+ retval = 1
90+
7191 # Check for rogue categories.
7292 if args .categories and pkginfo .get ("category" ) not in args .categories :
7393 print (
You can’t perform that action at this time.
0 commit comments