(10.13) startosinstall --installpackage option does not properly handle multiple packages

Originator:gregneagle
Number:rdar://34979397 Date Originated:10/13/2017
Status: Resolved:
Product:macOS Product Version:10.13
Classification: Reproducible:Always
 
Summary:
10.13's startosinstall tool has a new --installpackage option. This option fails to properly stage packages for install when multiple packages are given.

Steps to Reproduce:

1) /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --installpkg /path/to/pkg1.pkg --installpkg /path/to/pkg2.pkg --installpkg /path/to/pkg3.pkg --installpkg /path/to/pkg4.pkg

2) When the machine restarts after the macOS install is set up, the installer complains that "The path /System/Installation/Packages/OSInstall.mpkg appears to be missing or damaged." and tells you to restart and try again.

 You can reboot into an alternate startup disk and examine the (previous) target disk:

The paths for all given packages are added to macOS Install Data/InstallInfo.plist under the "Additional Installs" key, but not all are actually copied to the paths indicated. For example:

	<key>Additional Installers</key>
	<array>
		<string>UnwrappedInstallers/78d4e18c246101ac030409a3b28cf1ba6006055e/DA_adminaccount.pkg</string>
		<string>UnwrappedInstallers/56609c54df6cc13597ea94d2ffd30540d7027dc7/SuppressSetupAssistant.pkg</string>
		<string>UnwrappedInstallers/a04a3ba6f46deddca73b98679d09d2e41a95b2fa/munkitools.pkg</string>
		<string>UnwrappedInstallers/6a0b81670c8f340ee2c51c98aa0572f5a8aa055b/munki_kickstart.pkg</string>
	</array>

but the actual UnwrappedInstallers directory only has two of the packages:

$ ls -al macOS\ Install\ Data/UnwrappedInstallers/
total 0
drwxr-xr-x   4 root  wheel  136 Oct 11 10:11 .
drwxr-xr-x@ 16 root  wheel  544 Oct 11 10:13 ..
drwxr-xr-x   3 root  wheel  102 Oct 11 10:12 56609c54df6cc13597ea94d2ffd30540d7027dc7
drwxr-xr-x   3 root  wheel  102 Oct 11 10:12 6a0b81670c8f340ee2c51c98aa0572f5a8aa055b

I can manually copy the missing packages to the paths listed in InstallInfo.plist and then if I restart into the macOS Installer environment, install proceeds successfully and the extra packages are installed.

Expected Results:

macOS High Sierra is installed, followed by the installation of the additional packages.

Actual Results:

Installation fails with "The path /System/Installation/Packages/OSInstall.mpkg appears to be missing or damaged."

Version/Build:

startosinstall from "Install macOS High Sierra.app", version 13.0.66, which contains macOS 10.13 Build 17A405

Configuration:

MacBookAir6,2, Intel Code i7 1.7GHz, 8GB RAM, 512GB SSD

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!