installapplications icon indicating copy to clipboard operation
installapplications copied to clipboard

InstallApplications silently fails with packages that are not universal if Rosetta is not installed

Open erikng opened this issue 4 years ago • 3 comments

When installing packages that do not contain <options customize="never" require-scripts="false" hostArchitectures="x86_64,arm64"/> in their Distribution file, IAs attempts to install the package and silently fails. It thinks the install is successful.

Your provisioning process may then fail in weird ways. A second IAs run will likely work, because Rosetta is now installed (by another script you have)

erikng avatar Mar 01 '21 21:03 erikng

What about adding Rosetta install in preflight script?

if [ $(/usr/bin/arch) == "arm64" ] ; then
    /usr/sbin/softwareupdate --install-rosetta --agree-to-license
fi

rodchristiansen avatar Mar 02 '21 21:03 rodchristiansen

I think I'm more interested in detecting and logging this so admins have some kind of idea as to what's going on. Debugging this took an entire day to figure out.

erikng avatar Mar 02 '21 23:03 erikng

@rodchristiansen's method works for me, but the Rosetta install command returns a 0, so make sure you add an exit 1 to the end of the script, or installapplications will remove itself before running anything else.

korylprince avatar Mar 17 '21 14:03 korylprince