I have a daemon that can check for and install software updates using softwareupdate. Up to Catalina 10.15.6, the order is
softwareupdate --list
for each update {
softwareupdate --download
softwareupdate --install
}
if any update has Action == restart
restart
The above has worked so far, but starting with Big Sur beta 5, I was getting infinite loop of download, install, restart.
After some trial & error, it appears that in Big Sur whenever Action is 'restart', the --install has to be paired with --restart. For example, updating from beta 6 to beta 7 would be
softwareupdate --install "macOS Big Sur Beta 7-20A5374g" --restart
This is not consistent with softwareupdate's man page, which has not been updated since 2012.
Anyone else notice this change? I don't know if the pairing --install/--restart is intentional because of the new Update volume, or is a bug that will go away soon. I already files a bug regarding this, FB8700934.
Post
Replies
Boosts
Views
Activity
I need to test my installer on Apple Silicon, and I have previously installed Rosetta so I no longer get the prompt to install Rosetta.
The Mac mini and Macbook Air M1 that were ordered came with 11.0.1 and 11.0.0 respectively. The mini didn't have Rosetta and Air is pre-installed.
Short of reinstalling Big Sur on the mini M1, how can I delete Rosetta 2?
Is it possible to get the installer's path from installer plugin? For example, I have installer on ~/Documents/MyInstaller.pkg. I'd like to get the full path of the file, ie. /Users/MyName/Documents/MyInstaller.pkg (or even to /Users/MyName/Documents).
NSString *path = [[NSBundle bundleForClass:[MyPlugin class]] bundlePath];
returns the path of where the plugin is located after it was loaded, which is in a temporary folder.
NSURL *appBundleURL = [[NSBundle mainBundle] bundleURL];
returns /System/Library/CoreServices/Installer.app for the Installer.app's path.
I tried examining the environment variables available to the plugin using:
NSDictionary *env = [[NSProcessInfo processInfo] environment];
however there are nothing about the actual installer path.
My goal is to check if there is a certain file exists in the same folder where the installer resides, and read the information from there. The information will be used in the plugin, before installation process starts (so a preflight script would be too late in this case).
Any help would be appreciated.