Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--update will not use a cached installer with --os option #287

Closed
dnikles opened this issue Sep 26, 2022 · 2 comments
Closed

--update will not use a cached installer with --os option #287

dnikles opened this issue Sep 26, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dnikles
Copy link

dnikles commented Sep 26, 2022

Describe the bug
When the --os option is used, and a valid installer is already on the system, it will not be used and instead a new installer is downloaded. This happens because the build of the current system is compared to the build of the cached installer, instead of comparing the build of the latest available installer to the build of the cached installer.

To Reproduce
On a computer that is not yet on OS12, run sudo /Library/Management/erase-install/erase-install.sh --os=12 --update and it will download a new installer. Run it again and a new installer will be downloaded, instead of using the one that was just cached.

Expected behavior
A new installer should not be downloaded if the cached installer is valid.

Code/log output

 [find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_12.6-21G115.sparseimage.
   [check_installer_is_valid] Checking validity of /Volumes/Install_macOS_12.6-21G115/Applications/Install macOS Monterey.app.
   [check_installer_is_valid] Mounting /Volumes/Install_macOS_12.6-21G115/Applications/Install macOS Monterey.app/Contents/SharedSupport/SharedSupport.dmg
   [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml
Volume Shared Support on disk8s2 force-unmounted
   [compare_build_versions] Comparing (1) 18G103 with (2) 21G115
   [check_installer_is_valid] Installer: 21G115 >= System: 18G103 : valid build.
   [erase-install] Existing installer does not match requested version, so replacing...

Screenshots

Environment (please complete the following information):

  • erase-install version 26.2 or 27

Additional context
This bug does not exist when --build is used.
It looks like with --os, it cannot pass this line successfully elif [[ "$prechosen_os" != "" && "$os_matches" != "yes" ]]

@dnikles dnikles added the bug Something isn't working label Sep 26, 2022
@grahampugh
Copy link
Owner

I believe this may have been addressed in my latest commit. Please try the latest pre-release package for v27.0 or the latest script in the v27.0 branch.

@dnikles
Copy link
Author

dnikles commented Oct 3, 2022

Fixed in my testing of latest v27

@dnikles dnikles closed this as completed Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants