macadmins / nudge-python

A tool to help users with pre-existing devices upgrade their OS version.
Apache License 2.0
212 stars 45 forks source link

SoftwareUpdate.prefspane not opened if current OS version is 10.X.0 and target version is 10.X.<not zero> #41

Closed pwadenz closed 4 years ago

pwadenz commented 4 years ago

As discussed over here https://macadmins.slack.com/archives/CDUU7DJQ2/p1583875136041200 - When running nudge on a computer running 10.15.0, if "path_to_app": "/Applications/Install macOS Catalina.app", is set in the config the log says [Nudge] Update application not found! Exiting..., whereas if you run the same config on a machine running 10.15.1 or greater it will detect the minor updates and push you to SoftwareUpdate.prefPane to install them.

It was pointed out that problem may be here - https://github.com/erikng/nudge/blob/90cfb311467c1288ad62a9f59b2c2e9a351619f0/payload/Library/nudge/Resources/nudge#L539

Logs_Config.zip

gregneagle commented 4 years ago

Compare failure:

2020-03-11 10:44:21.162 Python[3628:239541] [Nudge] Target OS version: 10.15.3 
2020-03-11 10:44:21.163 Python[3628:239541] [Nudge] Target OS subversion: 19D76
2020-03-11 10:44:21.163 Python[3628:239541] [Nudge] Cleaning up temporary files...
2020-03-11 10:44:21.167 Python[3628:239541] [Nudge] OS version is below the minimum threshold: 10.15
2020-03-11 10:44:21.167 Python[3628:239541] [Nudge] OS version is below the minimum threshold subversion: 19A603
2020-03-11 10:44:21.167 Python[3628:239541] [Nudge] Update application not found! Exiting...

to success:

2020-03-10 14:59:37.853 Python[544:4069] [Nudge] Target OS version: 10.15.3 
2020-03-10 14:59:37.878 Python[544:4069] [Nudge] Target OS subversion: 19D76
2020-03-10 14:59:37.878 Python[544:4069] [Nudge] Cleaning up temporary files...
2020-03-10 14:59:37.973 Python[544:4069] [Nudge] OS version is below the minimum threshold: 10.15.1
2020-03-10 14:59:37.973 Python[544:4069] [Nudge] OS version is below the minimum threshold subversion: 19B88
2020-03-10 14:59:37.973 Python[544:4069] [Nudge] Checking for minor updates.
2020-03-10 15:17:44.872 Python[544:4069] [Nudge] Timer is set to 7200.0
aysiu commented 4 years ago

Are you using the code from the releases page? https://github.com/erikng/nudge/releases/tag/2.0rc2

If so, that doesn't include changes from this PR: https://github.com/erikng/nudge/pull/35/files

That PR has already been merged into master: https://github.com/erikng/nudge/blob/master/payload/Library/nudge/Resources/nudge#L191-L202

pwadenz commented 4 years ago

Resolved and tested with this release - https://github.com/erikng/nudge/releases/tag/2.0